diff options
| author | christos <christos@NetBSD.org> | 1998-11-15 17:21:49 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1998-11-15 17:21:49 +0000 |
| commit | 8cc3f31582bebc97a110ee04eeef0c218edde9d6 (patch) | |
| tree | f859fff4f9c1c8e2492196dc646ad2d6e6182adf /lib/libc/string | |
| parent | f8dfd806d0341d320cb25c1e7e8ee09088d745af (diff) | |
delint
Diffstat (limited to 'lib/libc/string')
| -rw-r--r-- | lib/libc/string/__strerror.c | 10 | ||||
| -rw-r--r-- | lib/libc/string/__strsignal.c | 11 | ||||
| -rw-r--r-- | lib/libc/string/strerror.c | 5 | ||||
| -rw-r--r-- | lib/libc/string/strpbrk.c | 5 | ||||
| -rw-r--r-- | lib/libc/string/strsignal.c | 5 | ||||
| -rw-r--r-- | lib/libc/string/strstr.c | 5 | ||||
| -rw-r--r-- | lib/libc/string/strtok.c | 10 | ||||
| -rw-r--r-- | lib/libc/string/strtok_r.c | 10 |
8 files changed, 33 insertions, 28 deletions
diff --git a/lib/libc/string/__strerror.c b/lib/libc/string/__strerror.c index 24a2c2d9b5f..46a0f27a45a 100644 --- a/lib/libc/string/__strerror.c +++ b/lib/libc/string/__strerror.c @@ -1,4 +1,4 @@ -/* $NetBSD: __strerror.c,v 1.13 1998/07/26 13:36:34 mycroft Exp $ */ +/* $NetBSD: __strerror.c,v 1.14 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: __strerror.c,v 1.13 1998/07/26 13:36:34 mycroft Exp $"); +__RCSID("$NetBSD: __strerror.c,v 1.14 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -63,7 +63,7 @@ const char * __strerror(num, buf, buflen) int num; char *buf; - int buflen; + size_t buflen; { #define UPREFIX "Unknown error: %u" unsigned int errnum; @@ -76,8 +76,8 @@ __strerror(num, buf, buflen) errnum = num; /* convert to unsigned */ if (errnum < sys_nerr) { #ifdef NLS - strncpy(buf, catgets(catd, 1, errnum, - (char *)sys_errlist[errnum]), buflen); + (void)strncpy(buf, catgets(catd, 1, (int)errnum, + sys_errlist[errnum]), buflen); buf[buflen - 1] = '\0'; #else return(sys_errlist[errnum]); diff --git a/lib/libc/string/__strsignal.c b/lib/libc/string/__strsignal.c index da980db1e9a..8fc40f49a29 100644 --- a/lib/libc/string/__strsignal.c +++ b/lib/libc/string/__strsignal.c @@ -1,4 +1,4 @@ -/* $NetBSD: __strsignal.c,v 1.15 1998/07/26 13:36:34 mycroft Exp $ */ +/* $NetBSD: __strsignal.c,v 1.16 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: __strsignal.c,v 1.15 1998/07/26 13:36:34 mycroft Exp $"); +__RCSID("$NetBSD: __strsignal.c,v 1.16 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -53,11 +53,12 @@ __RCSID("$NetBSD: __strsignal.c,v 1.15 1998/07/26 13:36:34 mycroft Exp $"); #include <string.h> #include "extern.h" +/* ARGSUSED */ const char * __strsignal(num, buf, buflen) int num; char *buf; - int buflen; + size_t buflen; { #define UPREFIX "Unknown signal: %u" unsigned int signum; @@ -70,8 +71,8 @@ __strsignal(num, buf, buflen) signum = num; /* convert to unsigned */ if (signum < NSIG) { #ifdef NLS - (void)strncpy(buf, catgets(catd, 2, signum, - (char *)sys_siglist[signum]), NL_TEXTMAX); + (void)strncpy(buf, catgets(catd, 2, (int)signum, + sys_siglist[signum]), NL_TEXTMAX); buf[NL_TEXTMAX - 1] = '\0'; #else return((char *)sys_siglist[signum]); diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 6b427998206..006138ff948 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -1,4 +1,4 @@ -/* $NetBSD: strerror.c,v 1.10 1998/07/27 09:47:45 mycroft Exp $ */ +/* $NetBSD: strerror.c,v 1.11 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: strerror.c,v 1.10 1998/07/27 09:47:45 mycroft Exp $"); +__RCSID("$NetBSD: strerror.c,v 1.11 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -58,5 +58,6 @@ strerror(num) { static char buf[NL_TEXTMAX]; + /* LINTED const castaway */ return (__aconst char *)__strerror(num, buf, sizeof(buf)); } diff --git a/lib/libc/string/strpbrk.c b/lib/libc/string/strpbrk.c index 71909c6db75..4fac6bca28e 100644 --- a/lib/libc/string/strpbrk.c +++ b/lib/libc/string/strpbrk.c @@ -1,4 +1,4 @@ -/* $NetBSD: strpbrk.c,v 1.7 1998/02/03 18:49:22 perry Exp $ */ +/* $NetBSD: strpbrk.c,v 1.8 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1985, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)strpbrk.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strpbrk.c,v 1.7 1998/02/03 18:49:22 perry Exp $"); +__RCSID("$NetBSD: strpbrk.c,v 1.8 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -57,6 +57,7 @@ strpbrk(s1, s2) while ((c = *s1++) != 0) { for (scanp = s2; (sc = *scanp++) != 0;) if (sc == c) + /* LINTED interface specification */ return ((char *)(s1 - 1)); } return (NULL); diff --git a/lib/libc/string/strsignal.c b/lib/libc/string/strsignal.c index 13891833932..f856514fa41 100644 --- a/lib/libc/string/strsignal.c +++ b/lib/libc/string/strsignal.c @@ -1,4 +1,4 @@ -/* $NetBSD: strsignal.c,v 1.9 1998/07/27 09:47:45 mycroft Exp $ */ +/* $NetBSD: strsignal.c,v 1.10 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: strsignal.c,v 1.9 1998/07/27 09:47:45 mycroft Exp $"); +__RCSID("$NetBSD: strsignal.c,v 1.10 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -57,5 +57,6 @@ strsignal(sig) { static char buf[NL_TEXTMAX]; + /* LINTED interface specification */ return (__aconst char *)__strsignal(sig, buf, NL_TEXTMAX); } diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c index 4051ca03f6d..f93ed14d0f1 100644 --- a/lib/libc/string/strstr.c +++ b/lib/libc/string/strstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: strstr.c,v 1.7 1998/02/03 18:49:24 perry Exp $ */ +/* $NetBSD: strstr.c,v 1.8 1998/11/15 17:21:49 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)strstr.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strstr.c,v 1.7 1998/02/03 18:49:24 perry Exp $"); +__RCSID("$NetBSD: strstr.c,v 1.8 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -67,5 +67,6 @@ strstr(s, find) } while (strncmp(s, find, len) != 0); s--; } + /* LINTED interface specification */ return ((char *)s); } diff --git a/lib/libc/string/strtok.c b/lib/libc/string/strtok.c index e7f8dcd9140..8dee9f404f0 100644 --- a/lib/libc/string/strtok.c +++ b/lib/libc/string/strtok.c @@ -1,4 +1,4 @@ -/* $NetBSD: strtok.c,v 1.7 1998/02/03 18:49:25 perry Exp $ */ +/* $NetBSD: strtok.c,v 1.8 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)strtok.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strtok.c,v 1.7 1998/02/03 18:49:25 perry Exp $"); +__RCSID("$NetBSD: strtok.c,v 1.8 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -49,7 +49,7 @@ strtok(s, delim) char *s; const char *delim; { - char *spanp; + const char *spanp; int c, sc; char *tok; static char *last; @@ -63,7 +63,7 @@ strtok(s, delim) */ cont: c = *s++; - for (spanp = (char *)delim; (sc = *spanp++) != 0;) { + for (spanp = delim; (sc = *spanp++) != 0;) { if (c == sc) goto cont; } @@ -80,7 +80,7 @@ cont: */ for (;;) { c = *s++; - spanp = (char *)delim; + spanp = delim; do { if ((sc = *spanp++) == c) { if (c == 0) diff --git a/lib/libc/string/strtok_r.c b/lib/libc/string/strtok_r.c index 038954c5512..79dd509ab80 100644 --- a/lib/libc/string/strtok_r.c +++ b/lib/libc/string/strtok_r.c @@ -1,4 +1,4 @@ -/* $NetBSD: strtok_r.c,v 1.4 1998/09/27 17:57:49 kleink Exp $ */ +/* $NetBSD: strtok_r.c,v 1.5 1998/11/15 17:21:49 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strtok.c 5.8 (Berkeley) 2/24/91"; #else -__RCSID("$NetBSD: strtok_r.c,v 1.4 1998/09/27 17:57:49 kleink Exp $"); +__RCSID("$NetBSD: strtok_r.c,v 1.5 1998/11/15 17:21:49 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -55,7 +55,7 @@ strtok_r(s, delim, lasts) const char *delim; char **lasts; { - char *spanp; + const char *spanp; int c, sc; char *tok; @@ -67,7 +67,7 @@ strtok_r(s, delim, lasts) */ cont: c = *s++; - for (spanp = (char *)delim; (sc = *spanp++) != 0;) { + for (spanp = delim; (sc = *spanp++) != 0;) { if (c == sc) goto cont; } @@ -84,7 +84,7 @@ cont: */ for (;;) { c = *s++; - spanp = (char *)delim; + spanp = delim; do { if ((sc = *spanp++) == c) { if (c == 0) |
