diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-03 16:56:17 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-04 19:43:56 +0200 |
commit | 4bbccb02eaee35e20d3031e7ba4b3d08631ce934 (patch) | |
tree | 27fed6568b9faa5a2586c5929159b79a4002c294 /src/libsystemd/sd-bus/test-bus-chat.c | |
parent | dhcp: replace strerror() with %m (diff) | |
download | systemd-4bbccb02eaee35e20d3031e7ba4b3d08631ce934.tar.xz systemd-4bbccb02eaee35e20d3031e7ba4b3d08631ce934.zip |
tree-wide: introduce strerror_safe()
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-chat.c')
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-chat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c index 6181fb163e..d9716ae745 100644 --- a/src/libsystemd/sd-bus/test-bus-chat.c +++ b/src/libsystemd/sd-bus/test-bus-chat.c @@ -12,6 +12,7 @@ #include "bus-internal.h" #include "bus-match.h" #include "bus-util.h" +#include "errno-util.h" #include "fd-util.h" #include "format-util.h" #include "log.h" @@ -308,7 +309,7 @@ static void* client1(void *p) { errno = 0; if (read(pp[0], &x, 1) <= 0) { - log_error("Failed to read from pipe: %s", errno ? strerror(errno) : "early read"); + log_error("Failed to read from pipe: %s", errno != 0 ? strerror_safe(errno) : "early read"); goto finish; } |