Module Name: src Committed By: snj Date: Tue Dec 20 06:16:25 UTC 2016
Modified Files: src/common/lib/libc/stdlib [netbsd-7-0]: _strtoul.h Log Message: Pull up following revision(s) (requested by riastradh in ticket #1310): common/lib/libc/stdlib/_strtoul.h: revision 1.10 Set *endptr in all paths out of strtoul and family. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.8.1 src/common/lib/libc/stdlib/_strtoul.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/lib/libc/stdlib/_strtoul.h diff -u src/common/lib/libc/stdlib/_strtoul.h:1.7 src/common/lib/libc/stdlib/_strtoul.h:1.7.8.1 --- src/common/lib/libc/stdlib/_strtoul.h:1.7 Fri May 17 12:55:56 2013 +++ src/common/lib/libc/stdlib/_strtoul.h Tue Dec 20 06:16:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoul.h,v 1.7 2013/05/17 12:55:56 joerg Exp $ */ +/* $NetBSD: _strtoul.h,v 1.7.8.1 2016/12/20 06:16:25 snj Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -67,7 +67,10 @@ INT_FUNCNAME(_int_, _FUNCNAME, _l)(const 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