ws_pipe: don't check for negative number using DWORD.
authorDario Lombardo <lomato@gmail.com>
Thu, 24 May 2018 07:20:24 +0000 (09:20 +0200)
committerAnders Broman <a.broman58@gmail.com>
Thu, 24 May 2018 13:57:27 +0000 (13:57 +0000)
DWORD on windows is unsigned, then there is no point in checking
for negative values.

Change-Id: I0b03fb19ebdff86e610cd4571fc30c49b7bd1284
Reviewed-on: https://code.wireshark.org/review/27766
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
wsutil/ws_pipe.c

index d09f6bfe19674ba666af7cb9a7eb8c9167666073..bd712bcb85b90cd735ac3b6ae17d067b712d1f7c 100644 (file)
@@ -484,7 +484,7 @@ ws_read_string_from_pipe(ws_pipe_handle read_pipe, gchar *buffer,
         {
             break;
         }
-        if (bytes_avail <= 0)
+        if (bytes_avail == 0)
         {
             ret = TRUE;
             break;