From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Nov 2017 21:36:02 +0000 (+0100) Subject: importd: remove IN_SET to avoid ambiguity X-Git-Tag: v236~266^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dad3203ab872eef263f05bdf551384e91b619ea;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/src/import/importd.c b/src/import/importd.c index 22ac5fc..e23d6d0 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);