]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
manager: simplify manager_process_barrier_fd() a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 3 May 2023 12:12:26 +0000 (14:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 May 2023 12:58:17 +0000 (14:58 +0200)
src/core/manager.c

index 9226cd2ab7dad872c3650baeeda6c8ccae86d867..2a7e80ca67763078841de15879efcf090aa15e61 100644 (file)
@@ -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;