From: Jim Meyering Date: Sat, 3 Aug 1996 04:23:43 +0000 (+0000) Subject: (main): Set minus_flag to zero in two places. X-Git-Tag: TEXTUTILS-1_19b~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b8cad3534d1eaa5e9f228ed4ea37aa514428952;p=platform%2Fupstream%2Fcoreutils.git (main): Set minus_flag to zero in two places. Otherwise, `nice --1 -3' would mistakenly do the equivalent of `nice --3'. Thanks to Eric Backus for the test cases. --- diff --git a/src/nice.c b/src/nice.c index d5f60511d..e05cf7938 100644 --- a/src/nice.c +++ b/src/nice.c @@ -88,6 +88,8 @@ main (int argc, char **argv) { if (!isinteger (&s[1])) error (1, 0, _("invalid option `%s'"), s); + + minusflag = 0; /* FIXME: use xstrtol */ adjustment = atoi (&s[1]); adjustment_given = 1; @@ -107,6 +109,8 @@ main (int argc, char **argv) case 'n': if (!isinteger (optarg)) error (1, 0, _("invalid priority `%s'"), optarg); + + minusflag = 0; /* FIXME: use xstrtol */ adjustment = atoi (optarg); adjustment_given = 1;