]> diplodocus.org Git - nmh/blobdiff - uip/inc.c
Make sure we return the descriptor from the file handle. Noted by
[nmh] / uip / inc.c
index 68fb06b69715ff3d8415e9c547e3b8ad6b958bf0..c337dde5375b43d59523357fe692004226827b57 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -149,7 +149,7 @@ static gid_t return_gid;
 #endif /* not MAILGROUP */
 
 /* these variables have to be globals so that done() can correctly clean up the lockfile */
-static int locked = 0;
+static bool locked;
 static char *newmail;
 static FILE *in;
 
@@ -526,7 +526,7 @@ main (int argc, char **argv)
         /* Mail from a spool file. */
 
        if (access (newmail, W_OK) != NOTOK) {
-           locked++;
+           locked = true;
            if (trnflag) {
                SIGNAL (SIGHUP, SIG_IGN);
                SIGNAL (SIGINT, SIG_IGN);