diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2018-06-13 08:52:17 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2018-06-13 08:52:17 +0000 |
commit | b8c2a547289cf1d377d97150b723c339e48128d7 (patch) | |
tree | 2787be7bb180812b5463bd4ec142bca2d795333b /lib/libc | |
parent | c655e639c2b992a01cafde8d5ace93d835ada55e (diff) | |
download | src-b8c2a547289cf1d377d97150b723c339e48128d7.tar.gz src-b8c2a547289cf1d377d97150b723c339e48128d7.zip |
libc: remove explicit cast NULL in atoi
There isn't any reason to cast NULL so just remove it. Noticed when
cleaning up top.
Reviewed by: pstef
Notes
Notes:
svn path=/head/; revision=335041
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/atoi.3 | 2 | ||||
-rw-r--r-- | lib/libc/stdlib/atoi.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3 index 025019f4bfea..2618ab22810c 100644 --- a/lib/libc/stdlib/atoi.3 +++ b/lib/libc/stdlib/atoi.3 @@ -57,7 +57,7 @@ representation. .Pp It is equivalent to: .Bd -literal -offset indent -(int)strtol(nptr, (char **)NULL, 10); +(int)strtol(nptr, NULL, 10); .Ed .Pp The diff --git a/lib/libc/stdlib/atoi.c b/lib/libc/stdlib/atoi.c index c268a8c1569d..700c498029d7 100644 --- a/lib/libc/stdlib/atoi.c +++ b/lib/libc/stdlib/atoi.c @@ -46,11 +46,11 @@ __FBSDID("$FreeBSD$"); int atoi(const char *str) { - return (int)strtol(str, (char **)NULL, 10); + return (int)strtol(str, NULL, 10); } int atoi_l(const char *str, locale_t locale) { - return (int)strtol_l(str, (char **)NULL, 10, locale); + return (int)strtol_l(str, NULL, 10, locale); } |