summaryrefslogtreecommitdiff
path: root/src/basic/socket-util.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-29 13:05:36 +0200
committerDaniel Mack <github@zonque.org>2015-07-29 13:05:36 +0200
commit409f2e178c8a78c2ba610ec7d0bf4aa05f91cdc7 (patch)
treeabf2ce3056428255bc2c5d7edced9bbfb694b316 /src/basic/socket-util.c
parent39d1a2d05d4cc75c57de2658ceef04caa9928768 (diff)
parent1938ac5136ddd87dd4f0bccc42b6f5d41f4ca6ba (diff)
Merge pull request #769 from poettering/socket-util-no-log
socket-util: library calls shouldn't log on their own
Diffstat (limited to 'src/basic/socket-util.c')
-rw-r--r--src/basic/socket-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index e8bb10dc9b..62f99b322e 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -662,13 +662,13 @@ int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret)
r = sockaddr_pretty(&sa->sa, salen, true, true, &ret);
if (r < 0)
- return log_error_errno(r, "sockadd_pretty() failed: %m");
+ return r;
log_debug_errno(saved_errno, "getnameinfo(%s) failed: %m", ret);
} else {
ret = strdup(host);
if (!ret)
- return log_oom();
+ return -ENOMEM;
}
*_ret = ret;
@@ -683,7 +683,7 @@ int getnameinfo_pretty(int fd, char **ret) {
assert(ret);
if (getsockname(fd, &sa.sa, &salen) < 0)
- return log_error_errno(errno, "getsockname(%d) failed: %m", fd);
+ return -errno;
return socknameinfo_pretty(&sa, salen, ret);
}