]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/varlink.c
various: use _NEG_ macros to reduce indentation
[thirdparty/systemd.git] / src / shared / varlink.c
index 7685377cba58c5ff8bb3919fcee2a33101eaf6f9..41c2daf02bd8d21e12338ed405a0adf8fa509839 100644 (file)
@@ -1368,14 +1368,11 @@ int varlink_flush(Varlink *v) {
                 }
 
                 r = fd_wait_for_event(v->fd, POLLOUT, USEC_INFINITY);
-                if (r < 0) {
-                        if (ERRNO_IS_TRANSIENT(r))
-                                continue;
-
+                if (ERRNO_IS_NEG_TRANSIENT(r))
+                        continue;
+                if (r < 0)
                         return varlink_log_errno(v, r, "Poll failed on fd: %m");
-                }
-
-                assert(r != 0);
+                assert(r > 0);
 
                 handle_revents(v, r);
         }