Switch logic from != to ==. Makes the code easier to read.
authorclaudio <claudio@openbsd.org>
Thu, 8 Apr 2021 17:07:55 +0000 (17:07 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 8 Apr 2021 17:07:55 +0000 (17:07 +0000)
usr.sbin/rpki-client/main.c

index 8957889..a290203 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: main.c,v 1.133 2021/04/08 16:32:42 claudio Exp $ */
+/*     $OpenBSD: main.c,v 1.134 2021/04/08 17:07:55 claudio Exp $ */
 /*
  * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -1044,9 +1044,9 @@ main(int argc, char *argv[])
                if (pid == -1) {
                        if (errno == EINTR)
                                continue;
-                       if (errno != ECHILD)
-                               err(1, "wait");
-                       break;
+                       if (errno == ECHILD)
+                               break;
+                       err(1, "wait");
                }
 
                if (pid == procpid)