From 3dad3203ab872eef263f05bdf551384e91b619ea Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Nov 2017 22:36:02 +0100 Subject: 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. --- src/import/importd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/import') 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); -- cgit v1.2.3