Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/string De-lint. Reviewed by Christos.
details: https://anonhg.NetBSD.org/src/rev/84c9abff25b2
branches: trunk
changeset: 503577:84c9abff25b2
user: wiz <wiz%NetBSD.org@localhost>
date: Fri Feb 09 11:47:21 2001 +0000
description:
De-lint. Reviewed by Christos.
diffstat:
lib/libc/string/index.c | 8 +++++---
lib/libc/string/rindex.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 27b86b8121b9 -r 84c9abff25b2 lib/libc/string/index.c
--- a/lib/libc/string/index.c Fri Feb 09 10:55:48 2001 +0000
+++ b/lib/libc/string/index.c Fri Feb 09 11:47:21 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: index.c,v 1.11 1999/09/20 04:39:44 lukem Exp $ */
+/* $NetBSD: index.c,v 1.12 2001/02/09 11:47:21 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: index.c,v 1.11 1999/09/20 04:39:44 lukem Exp $");
+__RCSID("$NetBSD: index.c,v 1.12 2001/02/09 11:47:21 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -63,8 +63,10 @@
_DIAGASSERT(p != NULL);
for (;; ++p) {
- if (*p == ch)
+ if (*p == ch) {
+ /* LINTED const cast-away */
return((char *)p);
+ }
if (!*p)
return((char *)NULL);
}
diff -r 27b86b8121b9 -r 84c9abff25b2 lib/libc/string/rindex.c
--- a/lib/libc/string/rindex.c Fri Feb 09 10:55:48 2001 +0000
+++ b/lib/libc/string/rindex.c Fri Feb 09 11:47:21 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rindex.c,v 1.11 1999/09/20 04:39:45 lukem Exp $ */
+/* $NetBSD: rindex.c,v 1.12 2001/02/09 11:47:22 wiz Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rindex.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: rindex.c,v 1.11 1999/09/20 04:39:45 lukem Exp $");
+__RCSID("$NetBSD: rindex.c,v 1.12 2001/02/09 11:47:22 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -65,8 +65,10 @@
_DIAGASSERT(p != NULL);
for (save = NULL;; ++p) {
- if (*p == ch)
+ if (*p == ch) {
+ /* LINTED const cast-away */
save = (char *)p;
+ }
if (!*p)
return(save);
}
Home |
Main Index |
Thread Index |
Old Index