From: Lennart Poettering Date: Wed, 3 May 2023 12:12:26 +0000 (+0200) Subject: manager: simplify manager_process_barrier_fd() a bit X-Git-Tag: v254-rc1~567^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4627645442345dd5e433fec33913f034d48c8091;p=thirdparty%2Fsystemd.git manager: simplify manager_process_barrier_fd() a bit --- diff --git a/src/core/manager.c b/src/core/manager.c index 9226cd2ab7d..2a7e80ca677 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2525,11 +2525,10 @@ static bool manager_process_barrier_fd(char * const *tags, FDSet *fds) { /* nothing else must be sent when using BARRIER=1 */ if (strv_contains(tags, "BARRIER=1")) { - if (strv_length(tags) == 1) { - if (fdset_size(fds) != 1) - log_warning("Got incorrect number of fds with BARRIER=1, closing them."); - } else + if (strv_length(tags) != 1) log_warning("Extra notification messages sent with BARRIER=1, ignoring everything."); + else if (fdset_size(fds) != 1) + log_warning("Got incorrect number of fds with BARRIER=1, closing them."); /* Drop the message if BARRIER=1 was found */ return true;