summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-03 23:56:17 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-05 02:43:56 +0900
commit4bbccb02eaee35e20d3031e7ba4b3d08631ce934 (patch)
tree27fed6568b9faa5a2586c5929159b79a4002c294 /src/libsystemd/sd-bus/test-bus-chat.c
parent7fa6223f67662e8d5ee26092240b4e1d091a69f5 (diff)
downloadsystemd-4bbccb02eaee35e20d3031e7ba4b3d08631ce934.tar.gz
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.c3
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;
}