Fix getsockname error return check.

This commit is contained in:
Reiter Wolfgang authored and Simon Kelley committed 2017-01-08 17:39:06 +00:00
1 parent ae3154aca9
commit 5eb9dde09c
1 file changed
+1 -1
+1 -1
View File
@@ -73,7 +73,7 @@ void netlink_init(void)
}
if (daemon->netlinkfd == -1 ||
getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == 1)
getsockname(daemon->netlinkfd, (struct sockaddr *)&addr, &slen) == -1)
die(_("cannot create netlink socket: %s"), NULL, EC_MISC);
/* save pid assigned by bind() and retrieved by getsockname() */