Cast -1 to DWORD for comparing to variable

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
[smcv: add space after cast, that is our coding style]
Reviewed-by: Simon McVittie <smcv@debian.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
This commit is contained in:
Thomas Zimmermann 2016-08-19 11:23:54 +02:00 committed by Simon McVittie
parent 45d68fe384
commit 9b16f35398

View file

@ -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;