Module Name: src Committed By: riastradh Date: Sat Nov 5 21:11:30 UTC 2016
Modified Files: src/common/lib/libc/stdlib: _strtoul.h Log Message: Set *endptr in all paths out of strtoul and family. XXX pullup-6 XXX pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 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.9 src/common/lib/libc/stdlib/_strtoul.h:1.10 --- src/common/lib/libc/stdlib/_strtoul.h:1.9 Fri Nov 13 16:02:07 2015 +++ src/common/lib/libc/stdlib/_strtoul.h Sat Nov 5 21:11:30 2016 @@ -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 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