From c3538c46cf7d8ca172173decfcc7e66872ab5fa1 Mon Sep 17 00:00:00 2001 From: Vincent Labrecque Date: Mon, 19 Jul 2004 12:14:09 +0000 Subject: correct error checking for strtonum, from mjc@bitz.ca --- usr.bin/mg/main.c | 4 ++-- 1 file 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 { -- cgit v1.2.3