Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/at PR/44147: Henning Petersen: Add missing closedir ...



details:   https://anonhg.NetBSD.org/src/rev/6641f6888af4
branches:  trunk
changeset: 759019:6641f6888af4
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 24 17:40:41 2010 +0000

description:
PR/44147: Henning Petersen: Add missing closedir calls.

diffstat:

 usr.bin/at/at.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r 0e63ec993ac3 -r 6641f6888af4 usr.bin/at/at.c
--- a/usr.bin/at/at.c   Wed Nov 24 17:20:24 2010 +0000
+++ b/usr.bin/at/at.c   Wed Nov 24 17:40:41 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: at.c,v 1.27 2009/01/18 01:02:41 lukem Exp $    */
+/*     $NetBSD: at.c,v 1.28 2010/11/24 17:40:41 christos Exp $ */
 
 /*
  *  at.c : Put file into atrun queue
@@ -72,7 +72,7 @@
 #if 0
 static char rcsid[] = "$OpenBSD: at.c,v 1.15 1998/06/03 16:20:26 deraadt Exp $";
 #else
-__RCSID("$NetBSD: at.c,v 1.27 2009/01/18 01:02:41 lukem Exp $");
+__RCSID("$NetBSD: at.c,v 1.28 2010/11/24 17:40:41 christos Exp $");
 #endif
 #endif
 
@@ -195,7 +195,7 @@
        (void)sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
 
-       sigaction(SIGINT, &act, NULL);
+       (void)sigaction(SIGINT, &act, NULL);
 
        (void)strlcpy(atfile, _PATH_ATJOBS, sizeof(atfile));
        ppos = atfile + strlen(atfile);
@@ -225,7 +225,7 @@
         * Set an alarm so a timeout occurs after ALARMC seconds, in case
         * something is seriously broken.
         */
-       sigaction(SIGALRM, &act, NULL);
+       (void)sigaction(SIGALRM, &act, NULL);
        (void)alarm(ALARMC);
        (void)fcntl(lockdes, F_SETLKW, &lock);
        (void)alarm(0);
@@ -484,6 +484,7 @@
                    6, (S_IXUSR & buf.st_mode) ? "" : "(done)",
                    jobno);
        }
+       (void)closedir(spool);
        PRIV_END;
 }
 
@@ -565,6 +566,7 @@
                        }
                }
        }
+       (void)closedir(spool);
 }
 
 /* Global functions */



Home | Main Index | Thread Index | Old Index