diff options
author | Vincent Labrecque <vincent@cvs.openbsd.org> | 2004-07-19 12:14:09 +0000 |
---|---|---|
committer | Vincent Labrecque <vincent@cvs.openbsd.org> | 2004-07-19 12:14:09 +0000 |
commit | c3538c46cf7d8ca172173decfcc7e66872ab5fa1 (patch) | |
tree | 1dcd3b000de39ba820896080130588355068139a | |
parent | f3c3a042797b07ba47b61b1ee704997968d40c41 (diff) |
correct error checking for strtonum, from mjc@bitz.ca
-rw-r--r-- | usr.bin/mg/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index 49b916effc8..a8bf7264bbb 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.32 2004/07/11 23:46:17 vincent Exp $ */ +/* $OpenBSD: main.c,v 1.33 2004/07/19 12:14:08 vincent Exp $ */ /* * Mainline. @@ -93,7 +93,7 @@ main(int argc, char **argv) const char *errstr; lval = strtonum(&argv[i][1], INT_MIN, INT_MAX, &errstr); - if (argv[i][1] == '\0' || *errstr != '\0') + if (argv[i][1] == '\0' || errstr != NULL) goto notnum; startrow = lval; } else { |