summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-01 22:36:02 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-01 23:09:05 +0100
commit3dad3203ab872eef263f05bdf551384e91b619ea (patch)
tree309009cb1a99e94f2a45b813a6d75c7253a5cce9 /src/import
parentjournald: unitialized variable access (diff)
downloadsystemd-3dad3203ab872eef263f05bdf551384e91b619ea.tar.xz
systemd-3dad3203ab872eef263f05bdf551384e91b619ea.zip
importd: remove IN_SET to avoid ambiguity
clang warns: ../src/import/importd.c:254:70: warning: 'break' is bound to current loop, GCC binds it to the enclosing loop [-Wgcc-compat] while ((e < t->log_message + t->log_message_size) && IN_SET(*e, 0, '\n')) ^ Let's just play it safe and not use IN_SET here.
Diffstat (limited to 'src/import')
-rw-r--r--src/import/importd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/importd.c b/src/import/importd.c
index 22ac5fcc84..e23d6d0c80 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -251,7 +251,7 @@ static void transfer_send_logs(Transfer *t, bool flush) {
n = strndup(t->log_message, e - t->log_message);
/* Skip over NUL and newlines */
- while ((e < t->log_message + t->log_message_size) && IN_SET(*e, 0, '\n'))
+ while (e < t->log_message + t->log_message_size && (*e == 0 || *e == '\n'))
e++;
memmove(t->log_message, e, t->log_message + sizeof(t->log_message) - e);