diff options
| author | riastradh <riastradh@NetBSD.org> | 2016-11-05 21:11:30 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2016-11-05 21:11:30 +0000 |
| commit | ed8be7cb04e86547e59cef2af9153cf6e7b79cc8 (patch) | |
| tree | 9f173a69e7250b45d174b73143d78638f7b15238 /common/lib/libc/stdlib | |
| parent | 8d0a5f58596b93279e650c2fb1e0fe0b910e9cf3 (diff) | |
Set *endptr in all paths out of strtoul and family.
XXX pullup-6
XXX pullup-7
Diffstat (limited to 'common/lib/libc/stdlib')
| -rw-r--r-- | common/lib/libc/stdlib/_strtoul.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/lib/libc/stdlib/_strtoul.h b/common/lib/libc/stdlib/_strtoul.h index bacbdd4d66c..cb5c1c6a6aa 100644 --- a/common/lib/libc/stdlib/_strtoul.h +++ b/common/lib/libc/stdlib/_strtoul.h @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoul.h,v 1.9 2015/11/13 16:02:07 christos Exp $ */ +/* $NetBSD: _strtoul.h,v 1.10 2016/11/05 21:11:30 riastradh Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -67,7 +67,10 @@ INT_FUNCNAME(_int_, _FUNCNAME, _l)(const char *nptr, char **endptr, if (base && (base < 2 || base > 36)) { #if !defined(_KERNEL) && !defined(_STANDALONE) errno = EINVAL; - return(0); + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = __UNCONST(nptr); + return 0; #else panic("%s: invalid base %d", __func__, base); #endif |
