summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-03-10 13:31:59 +0100
committerDaniel Mack <github@zonque.org>2016-03-10 13:31:59 +0100
commitb5adc91a67f9e3e01112a51895b931d388304441 (patch)
tree1f4fc19ef7cef27fdf851af386338418ff14c1d8
parentc41d3b3a0ca1c53cbf05563f00bcef72db58d9b0 (diff)
parenta0c9496cc826957fe0f3926f619e073f17a9ab4d (diff)
Merge pull request #2819 from bachradsusi/mac_selinux_bind-do-not-rely-on-errno
socket_address_listen - do not rely on errno
-rw-r--r--src/basic/socket-label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/socket-label.c b/src/basic/socket-label.c
index 35e9573aa4..65509be901 100644
--- a/src/basic/socket-label.c
+++ b/src/basic/socket-label.c
@@ -122,7 +122,7 @@ int socket_address_listen(
r = mac_selinux_bind(fd, &a->sockaddr.sa, a->size);
- if (r < 0 && errno == EADDRINUSE) {
+ if (r == -EADDRINUSE) {
/* Unlink and try again */
unlink(a->sockaddr.un.sun_path);
r = bind(fd, &a->sockaddr.sa, a->size);