Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/ntp/dist/ntpd fix debug printf format



details:   https://anonhg.NetBSD.org/src/rev/dd47393b11e8
branches:  trunk
changeset: 749980:dd47393b11e8
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 14 00:42:21 2009 +0000

description:
fix debug printf format
fix bogus ctype cast

diffstat:

 external/bsd/ntp/dist/ntpd/refclock_acts.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 18c296127b3b -r dd47393b11e8 external/bsd/ntp/dist/ntpd/refclock_acts.c
--- a/external/bsd/ntp/dist/ntpd/refclock_acts.c        Mon Dec 14 00:42:06 2009 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_acts.c        Mon Dec 14 00:42:21 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refclock_acts.c,v 1.1.1.1 2009/12/13 16:55:43 kardel Exp $     */
+/*     $NetBSD: refclock_acts.c,v 1.2 2009/12/14 00:42:21 christos Exp $       */
 
 /*
  * refclock_acts - clock driver for the NIST/USNO/PTB/NPL Computer Time
@@ -330,7 +330,7 @@
                                acts_message(peer);
                                up->bufptr = pp->a_lastcode;
                        }
-               } else if (!iscntrl(*tptr)) {
+               } else if (!iscntrl((unsigned char)*tptr)) {
                        *up->bufptr++ = *tptr;
                        if (*tptr == '*' || *tptr == '#') {
                                up->tstamp = pp->lastrec;
@@ -364,7 +364,7 @@
        up = (struct actsunit *)pp->unitptr;
 #ifdef DEBUG
        ioctl(pp->io.fd, TIOCMGET, (char *)&modem);
-       snprintf(tbuf, sizeof(tbuf), "acts: %04x (%d %d) %d %s", modem,
+       snprintf(tbuf, sizeof(tbuf), "acts: %04x (%d %d) %zu %s", modem,
            up->state, up->timer, strlen(pp->a_lastcode),
            pp->a_lastcode);
        if (debug)



Home | Main Index | Thread Index | Old Index