commit | b5e74165d1462d69deaecbf14305dbf2eee746d5 | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Thu Nov 28 21:11:34 2013 -0600 |
committer | Rob Landley <rob@landley.net> | Thu Nov 28 21:11:34 2013 -0600 |
tree | 039b23d58a1316bd69fcb68b4743800451c34fb9 | |
parent | 5ec4ab3113dcc813b6040d7ded38e297df99dc0e [diff] [blame] |
Oops, cleaned up ifconfig uses atolx_range() instead of get_int_list(). Check that in.
diff --git a/lib/lib.c b/lib/lib.c index de8c7be..14de91d 100644 --- a/lib/lib.c +++ b/lib/lib.c
@@ -203,6 +203,16 @@ return val; } +long atolx_range(char *numstr, long low, long high) +{ + long val = atolx(numstr); + + if (val < low) error_exit("%ld < %ld", val, low); + if (val > high) error_exit("%ld > %ld", val, high); + + return val; +} + int numlen(long l) { int len = 0;