]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Allow use of 0 (zero) as the margin offset
authorJim Meyering <jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000 (04:06 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000 (04:06 +0000)
argument to the -o option.  Patch from Gary Anderson.

src/pr.c

index b4ddf69fe7ced5e23a8d5c750bb50c9315c94c30..68c12a64c62ddcc7b4eacf8f04d012d0b269eb24 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -816,7 +816,7 @@ main (int argc, char **argv)
          {
            long int tmp_long;
            if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
-               || tmp_long <= 0 || tmp_long > INT_MAX)
+               || tmp_long < 0 || tmp_long > INT_MAX)
              error (EXIT_FAILURE, 0,
                     _("`-o MARGIN' invalid line offset: `%s'"), optarg);
            chars_per_margin = (int) tmp_long;