From a3f8d23a4833fc44d840e38f6578df7fa270d09f Mon Sep 17 00:00:00 2001 From: "Rodney W. Grimes" Date: Fri, 7 Jul 1995 08:23:52 +0000 Subject: [PATCH] This fixes 'split -l NNN foo'. As it stands split will complain about an 'illegal line count' becuase it's looking at the wrong end pointer (ep) to detect any extra characters after the NNN. Submitted by: Rich Murphey This should probably get pulled into 2.0.6 and 2.1.0 --- usr.bin/split/split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 198532bc84f7..efd2a219a723 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -110,7 +110,7 @@ main(argc, argv) case 'l': /* Line count. */ if (numlines != 0) usage(); - if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *p) + if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep) errx(1, "%s: illegal line count.", optarg); break; default: