From 1074a4f2a20ca87fd1a42eb4aacf70b7b074524a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 19 Aug 2016 11:23:54 +0200 Subject: [PATCH 3/9] 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 6c79b79..e63c049 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.9.3