mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
tests: Fix incomplete failure check in socket test
For the check "if (error != NULL)" to work as expected, the create_server() (and create_server_full()) functions need to make sure to return an error for all the possible failures, but this might not always be the case. Catch all the failures by testing for a non-NULL return value if there was no error.
This commit is contained in:
parent
027c3f8d59
commit
b3197f2740
@ -342,6 +342,7 @@ test_ip_async (GSocketFamily family)
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
g_assert_nonnull (data);
|
||||
|
||||
addr = g_socket_get_local_address (data->server, &error);
|
||||
g_assert_no_error (error);
|
||||
|
Loading…
Reference in New Issue
Block a user