mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-29 02:50:04 +01:00
GSocket: fix a couple of return values
g_socket_receive_with_blocking() and g_socket_send_with_blocking claim to return -1 in error, their return type is gssize, and yet they return FALSE if the initial g_return_val_if_fail() call fails. https://bugzilla.gnome.org/show_bug.cgi?id=667226
This commit is contained in:
parent
f38a1dbca7
commit
8b96fb3761
@ -1837,7 +1837,7 @@ g_socket_receive_with_blocking (GSocket *socket,
|
||||
{
|
||||
gssize ret;
|
||||
|
||||
g_return_val_if_fail (G_IS_SOCKET (socket) && buffer != NULL, FALSE);
|
||||
g_return_val_if_fail (G_IS_SOCKET (socket) && buffer != NULL, -1);
|
||||
|
||||
if (!check_socket (socket, error))
|
||||
return -1;
|
||||
@ -2009,7 +2009,7 @@ g_socket_send_with_blocking (GSocket *socket,
|
||||
{
|
||||
gssize ret;
|
||||
|
||||
g_return_val_if_fail (G_IS_SOCKET (socket) && buffer != NULL, FALSE);
|
||||
g_return_val_if_fail (G_IS_SOCKET (socket) && buffer != NULL, -1);
|
||||
|
||||
if (!check_socket (socket, error))
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user