mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-10 05:45:32 +00:00
network-watch: Only g_set_error if error is not NULL
(cherry picked from commit ab20b6b8e3
)
This commit is contained in:
parent
0380bc08eb
commit
d55b737fb9
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ calls_network_watch_initable_init (GInitable *initable,
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
self->fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
self->fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||||
if (self->fd == -1) {
|
if (self->fd == -1 && error) {
|
||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
"Failed to create netlink socket: %d", errsv);
|
"Failed to create netlink socket: %d", errsv);
|
||||||
|
|
Loading…
Reference in a new issue