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:
Geoff Rehmet 1994-09-11 21:30:09 +00:00
parent fcccde5893
commit 282d727280
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2675

View File

@ -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);