Make get_int() think that "" (null) has the integer value 0.
(Which is the same behaviour as in 1.x) The install blows up without this. Reviewed by: rgrimes
This commit is contained in:
parent
fcccde5893
commit
282d727280
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2675
@ -529,6 +529,11 @@ get_int(v, lp)
|
||||
|
||||
for (; *v && isspace(*v); ++v);
|
||||
|
||||
if(!*v) {
|
||||
*lp = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isdigit(*v) || ((*v == '-' || *v == '+') && isdigit(*(v+1)))) {
|
||||
errno = 0;
|
||||
val = strtol(v, &ep, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user