From: David van Moolenbroek Date: Mon, 3 Sep 2012 11:51:56 +0000 (+0000) Subject: libsys: let optset parse largeish positive values X-Git-Tag: v3.2.1~347 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.rndc-confgen.html?a=commitdiff_plain;h=41df1b59f173973b2936779202c470299cc6de19;p=minix.git libsys: let optset parse largeish positive values Note that strtoul() also parses negative numbers correctly. --- diff --git a/lib/libsys/optset.c b/lib/libsys/optset.c index fe9bedaea..f3ef2a006 100644 --- a/lib/libsys/optset.c +++ b/lib/libsys/optset.c @@ -55,7 +55,7 @@ int len; case OPT_INT: if (len > 0) - val = strtol(ptr, NULL, entry->os_val); + val = (int) strtoul(ptr, NULL, entry->os_val); else val = 0;