Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/ntp/ntpd Stop argument to ctype function being char
details: https://anonhg.NetBSD.org/src/rev/97559058b478
branches: trunk
changeset: 570827:97559058b478
user: dsl <dsl%NetBSD.org@localhost>
date: Sat Oct 30 15:01:32 2004 +0000
description:
Stop argument to ctype function being char
diffstat:
dist/ntp/ntpd/refclock_neoclock4x.c | 9 +++++----
dist/ntp/ntpd/refclock_oncore.c | 6 +++---
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r 919af775d6f6 -r 97559058b478 dist/ntp/ntpd/refclock_neoclock4x.c
--- a/dist/ntp/ntpd/refclock_neoclock4x.c Sat Oct 30 14:31:45 2004 +0000
+++ b/dist/ntp/ntpd/refclock_neoclock4x.c Sat Oct 30 15:01:32 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refclock_neoclock4x.c,v 1.2 2003/12/04 16:23:37 drochner Exp $ */
+/* $NetBSD: refclock_neoclock4x.c,v 1.3 2004/10/30 15:01:32 dsl Exp $ */
/*
*
@@ -742,10 +742,11 @@
int hexdigit;
int i;
int n = 0;
+ int c;
- for(i=0; isxdigit(str[i]) && i < maxlen; i++)
+ for(i=0; isxdigit((c = (unsigned char)str[i])) && i < maxlen; i++)
{
- hexdigit = isdigit(str[i]) ? toupper(str[i]) - '0' : toupper(str[i]) - 'A' + 10;
+ hexdigit = isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
n = 16 * n + hexdigit;
}
*result = n;
@@ -761,7 +762,7 @@
int i;
int n = 0;
- for(i=0; isdigit(str[i]) && i < maxlen; i++)
+ for(i=0; isdigit((unsigned char)str[i]) && i < maxlen; i++)
{
digit = str[i] - '0';
n = 10 * n + digit;
diff -r 919af775d6f6 -r 97559058b478 dist/ntp/ntpd/refclock_oncore.c
--- a/dist/ntp/ntpd/refclock_oncore.c Sat Oct 30 14:31:45 2004 +0000
+++ b/dist/ntp/ntpd/refclock_oncore.c Sat Oct 30 15:01:32 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refclock_oncore.c,v 1.4 2003/12/04 17:10:34 drochner Exp $ */
+/* $NetBSD: refclock_oncore.c,v 1.5 2004/10/30 15:01:32 dsl Exp $ */
/*
* ----------------------------------------------------------------------------
@@ -1184,7 +1184,7 @@
for (ca = cc; *ca; ca++) {
if (isascii((int)*ca)) {
if (islower((int)*ca)) {
- *ca = toupper(*ca);
+ *ca = toupper((int)*ca);
} else if (isspace((int)*ca) || (*ca == '='))
break;
}
@@ -1204,7 +1204,7 @@
/* Uppercase argument as well */
for (cp = ca; *cp; cp++)
if (isascii((int)*cp) && islower((int)*cp))
- *cp = toupper(*cp);
+ *cp = toupper((int)*cp);
if (!strncmp(cc, "LAT", (size_t) 3)) {
f1 = f2 = f3 = 0;
Home |
Main Index |
Thread Index |
Old Index