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 -1
View File
@@ -643,7 +643,8 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
int r;
char *k = NULL;
if ((r = socket_address_print(&p->address, &k)) < 0)
r = socket_address_print(&p->address, &k);
if (r < 0)
t = strerror(-r);
else
t = k;