Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdlib For consistency add a _DIAGASSERT() case, an...



details:   https://anonhg.NetBSD.org/src/rev/f8c2a718d188
branches:  trunk
changeset: 509556:f8c2a718d188
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon May 07 08:32:20 2001 +0000

description:
For consistency add a _DIAGASSERT() case, and remove some cruft.

diffstat:

 lib/libc/stdlib/strtoll.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 1ea25ffe3235 -r f8c2a718d188 lib/libc/stdlib/strtoll.c
--- a/lib/libc/stdlib/strtoll.c Mon May 07 08:29:25 2001 +0000
+++ b/lib/libc/stdlib/strtoll.c Mon May 07 08:32:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strtoll.c,v 1.2 2000/03/07 20:02:00 kleink Exp $       */
+/*     $NetBSD: strtoll.c,v 1.3 2001/05/07 08:32:20 kleink Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,13 +38,13 @@
 #if 0
 static char sccsid[] = "from: @(#)strtoq.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: strtoll.c,v 1.2 2000/03/07 20:02:00 kleink Exp $");
+__RCSID("$NetBSD: strtoll.c,v 1.3 2001/05/07 08:32:20 kleink Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
-#include <sys/types.h>
 
+#include <assert.h>
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
@@ -73,6 +73,9 @@
        int c;
        int neg, any, cutlim;
 
+       _DIAGASSERT(nptr != NULL);
+       /* endptr may be NULL */
+
 #ifdef __GNUC__
        /* This outrageous construct just to shut up a GCC warning. */
        (void) &acc; (void) &cutoff;



Home | Main Index | Thread Index | Old Index