Module Name: src Committed By: eadler Date: Wed Jun 13 09:38:32 UTC 2018
Modified Files: src/lib/libc/stdlib: atoi.3 atoi.c Log Message: 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@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdlib/atoi.3 cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdlib/atoi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdlib/atoi.3 diff -u src/lib/libc/stdlib/atoi.3:1.10 src/lib/libc/stdlib/atoi.3:1.11 --- src/lib/libc/stdlib/atoi.3:1.10 Thu Aug 7 16:43:38 2003 +++ src/lib/libc/stdlib/atoi.3 Wed Jun 13 09:38:32 2018 @@ -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 @@ representation. .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 , Index: src/lib/libc/stdlib/atoi.c diff -u src/lib/libc/stdlib/atoi.c:1.14 src/lib/libc/stdlib/atoi.c:1.15 --- src/lib/libc/stdlib/atoi.c:1.14 Sun Jan 7 15:28:33 2018 +++ src/lib/libc/stdlib/atoi.c Wed Jun 13 09:38:32 2018 @@ -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 @@ atoi(const char *str) { _DIAGASSERT(str != NULL); - return((int)strtol(str, (char **)NULL, 10)); + return((int)strtol(str, NULL, 10)); }