Source-Changes-HG archive

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

[src/netbsd-6-1]: src/common/lib/libc/stdlib Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/f03ee8399d56
branches:  netbsd-6-1
changeset: 776206:f03ee8399d56
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Jul 11 21:09:21 2017 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1421):
        common/lib/libc/stdlib/_strtoul.h: revision 1.10
Set *endptr in all paths out of strtoul and family.

diffstat:

 common/lib/libc/stdlib/_strtoul.h |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r d6166a2ba506 -r f03ee8399d56 common/lib/libc/stdlib/_strtoul.h
--- a/common/lib/libc/stdlib/_strtoul.h Thu Jul 06 15:19:22 2017 +0000
+++ b/common/lib/libc/stdlib/_strtoul.h Tue Jul 11 21:09:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _strtoul.h,v 1.1 2008/08/20 12:42:26 joerg Exp $ */
+/* $NetBSD: _strtoul.h,v 1.1.30.1 2017/07/11 21:09:21 snj Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -56,7 +56,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