Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/stdlib Set *endptr in all paths out of strto...
details: https://anonhg.NetBSD.org/src/rev/b751ccc9afd5
branches: trunk
changeset: 348754:b751ccc9afd5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Nov 05 21:11:30 2016 +0000
description:
Set *endptr in all paths out of strtoul and family.
XXX pullup-6
XXX pullup-7
diffstat:
common/lib/libc/stdlib/_strtoul.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r afcd957f6198 -r b751ccc9afd5 common/lib/libc/stdlib/_strtoul.h
--- a/common/lib/libc/stdlib/_strtoul.h Sat Nov 05 20:57:31 2016 +0000
+++ b/common/lib/libc/stdlib/_strtoul.h Sat Nov 05 21:11:30 2016 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index