]> diplodocus.org Git - nmh/blobdiff - uip/dropsbr.c
sbr/dtimep.l: Remove redundant wrapping parenthesis in definitions.
[nmh] / uip / dropsbr.c
index a02e29c48fda1a28ac3ee6ed55682bf56c64056c..3109bcf78a1223cbcd08ef0c2a3ef2694c5439cd 100644 (file)
@@ -46,19 +46,16 @@ mbx_open (char *file, int mbx_style, uid_t uid, gid_t gid, mode_t mode)
     /* attempt to open and lock file */
     for (count = 4; count > 0; count--) {
         int failed_to_lock = 0;
-       if ((fd = lkopenspool (file, O_RDWR | O_CREAT |
-                              O_NONBLOCK, mode, &failed_to_lock)) == NOTOK) {
-            if (failed_to_lock) {
-                j = errno;
-                sleep (5);
-                continue;
-            } else {
-                return NOTOK;
-            }
-       }
 
-       /* good file descriptor */
-       break;
+       if ((fd = lkopenspool (file, O_RDWR | O_CREAT | O_NONBLOCK,
+            mode, &failed_to_lock)) != NOTOK)
+            break;
+
+        if (!failed_to_lock)
+            return NOTOK;
+
+        j = errno;
+        sleep (5);
     }
 
     errno = j;