Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdlib libc: remove explicit cast NULL in atoi



details:   https://anonhg.NetBSD.org/src/rev/6e8898e57188
branches:  trunk
changeset: 319832:6e8898e57188
user:      eadler <eadler%NetBSD.org@localhost>
date:      Wed Jun 13 09:38:32 2018 +0000

description:
libc: remove explicit cast NULL in atoi

There isn't any reason to cast NULL so just remove it. A similar change
was already made in DragonFly and FreeBSD (by me).

ok fly@

diffstat:

 lib/libc/stdlib/atoi.3 |  6 +++---
 lib/libc/stdlib/atoi.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (52 lines):

diff -r bf5720b81515 -r 6e8898e57188 lib/libc/stdlib/atoi.3
--- a/lib/libc/stdlib/atoi.3    Wed Jun 13 08:19:36 2018 +0000
+++ b/lib/libc/stdlib/atoi.3    Wed Jun 13 09:38:32 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: atoi.3,v 1.10 2003/08/07 16:43:38 agc Exp $
+.\"    $NetBSD: atoi.3,v 1.11 2018/06/13 09:38:32 eadler Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\"     from: @(#)atoi.3       8.1 (Berkeley) 6/4/93
 .\"
-.Dd June 4, 1993
+.Dd June 13, 2018
 .Dt ATOI 3
 .Os
 .Sh NAME
@@ -58,7 +58,7 @@
 .Pp
 It is equivalent to:
 .Bd -literal -offset indent
-(int)strtol(nptr, (char **)NULL, 10);
+(int)strtol(nptr, NULL, 10);
 .Ed
 .Sh SEE ALSO
 .Xr atof 3 ,
diff -r bf5720b81515 -r 6e8898e57188 lib/libc/stdlib/atoi.c
--- a/lib/libc/stdlib/atoi.c    Wed Jun 13 08:19:36 2018 +0000
+++ b/lib/libc/stdlib/atoi.c    Wed Jun 13 09:38:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atoi.c,v 1.14 2018/01/07 15:28:33 kamil Exp $  */
+/*     $NetBSD: atoi.c,v 1.15 2018/06/13 09:38:32 eadler Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)atoi.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: atoi.c,v 1.14 2018/01/07 15:28:33 kamil Exp $");
+__RCSID("$NetBSD: atoi.c,v 1.15 2018/06/13 09:38:32 eadler Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -46,5 +46,5 @@
 {
        _DIAGASSERT(str != NULL);
 
-       return((int)strtol(str, (char **)NULL, 10));
+       return((int)strtol(str, NULL, 10));
 }



Home | Main Index | Thread Index | Old Index