1 From f4c0aa3ba070e5c3ce996b33a31323a3a6820f0c Mon Sep 17 00:00:00 2001
2 From: Stephan Bergmann <sbergman@redhat.com>
3 Date: Wed, 2 Dec 2020 10:44:28 +0100
4 Subject: Fix checks for null HANDLE in Windows-only code
6 clang-cl failed with "error: unordered comparison between pointer and zero
7 ('HANDLE' (aka 'void *') and 'int')" in these two places introduced with
8 f219283b72ab537c2b5938222708f35227c1ebde "Sub-task CORE-4463: Windows
9 implementation for CORE-4462 (Make it possible to restore compressed .nbk files
10 without explicitly decompressing them)" and
11 c2cfa7824189ed7c3e5a19721effdf97c07dadfd "Prevent child process hung if it
12 writes too much data to the pipe and overflow the pipe buffer".
14 src/utilities/nbackup/nbackup.cpp | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
17 diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp
18 index 6598b6e331..4703079d67 100644
19 --- a/src/utilities/nbackup/nbackup.cpp
20 +++ b/src/utilities/nbackup/nbackup.cpp
21 @@ -385,7 +385,7 @@ FB_SIZE_T NBackup::read_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize)
23 // Read child's stderr often to prevent child process hung if it writes
24 // too much data to the pipe and overflow the pipe buffer.
25 - const bool checkChild = (childStdErr > 0 && file == backup);
26 + const bool checkChild = (childStdErr != 0 && file == backup);
30 @@ -790,7 +790,7 @@ void NBackup::close_backup()
37 const bool killed = (WaitForSingleObject(childId, 5000) != WAIT_OBJECT_0);