tree-wide: remove a number of invocations of strerror() and replace by %m

Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier.
This commit is contained in:
Lennart Poettering
2015-09-30 22:26:16 +02:00
parent 618234a525
commit e53fc357a9
15 changed files with 51 additions and 81 deletions
+2 -5
View File
@@ -146,11 +146,8 @@ int make_socket_fd(int log_level, const char* address, int flags) {
int fd, r;
r = socket_address_parse(&a, address);
if (r < 0) {
log_error("Failed to parse socket address \"%s\": %s",
address, strerror(-r));
return r;
}
if (r < 0)
return log_error_errno(r, "Failed to parse socket address \"%s\": %m", address);
fd = socket_address_listen(&a, flags, SOMAXCONN, SOCKET_ADDRESS_DEFAULT,
NULL, false, false, false, 0755, 0644, NULL);