From 9b16f35398f1a036f05d6cd211ba4a7ab7b88d42 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 19 Aug 2016 11:23:54 +0200 Subject: [PATCH] Cast -1 to DWORD for comparing to variable Signed-off-by: Thomas Zimmermann [smcv: add space after cast, that is our coding style] Reviewed-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357 --- dbus/dbus-sysdeps-win.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index bd18ddb..f340708 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -631,12 +631,12 @@ _dbus_write_socket_two (DBusSocket fd, { DBUS_SOCKET_SET_ERRNO (); _dbus_verbose ("WSASend: failed: %s\n", _dbus_strerror_from_errno ()); - bytes_written = -1; + bytes_written = (DWORD) -1; } else _dbus_verbose ("WSASend: = %ld\n", bytes_written); - if (bytes_written < 0 && errno == EINTR) + if (bytes_written == (DWORD) -1 && errno == EINTR) goto again; return bytes_written; -- 2.7.4