Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/newsyslog Fix



details:   https://anonhg.NetBSD.org/src/rev/b67c9d6866a8
branches:  trunk
changeset: 789730:b67c9d6866a8
user:      prlw1 <prlw1%NetBSD.org@localhost>
date:      Thu Sep 05 11:34:40 2013 +0000

description:
Fix
/var/log/httpd/access.log  644  52   *  $W0D23 ZBP /var/run/httpd.pid 30
newsyslog: config line 16: bad signal type
(strtol: **endptr is '\0' on success rather than *endptr)

diffstat:

 usr.bin/newsyslog/newsyslog.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d2020cd425db -r b67c9d6866a8 usr.bin/newsyslog/newsyslog.c
--- a/usr.bin/newsyslog/newsyslog.c     Thu Sep 05 09:03:13 2013 +0000
+++ b/usr.bin/newsyslog/newsyslog.c     Thu Sep 05 11:34:40 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $  */
+/*     $NetBSD: newsyslog.c,v 1.61 2013/09/05 11:34:40 prlw1 Exp $     */
 
 /*
  * Copyright (c) 1999, 2000 Andrew Doran <ad%NetBSD.org@localhost>
@@ -55,7 +55,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $");
+__RCSID("$NetBSD: newsyslog.c,v 1.61 2013/09/05 11:34:40 prlw1 Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -824,7 +824,7 @@
        
        if (isnumber(sig)) {
                n = (int)strtol(sig, &p, 0);
-               if (p != '\0' || n < 0 || n >= NSIG)
+               if (*p != '\0' || n < 0 || n >= NSIG)
                        return -1;
                return n;
        }



Home | Main Index | Thread Index | Old Index