From bc359d41a0c01bd670b14fa152b5d588363440b4 Mon Sep 17 00:00:00 2001 From: rgrimes Date: Fri, 7 Jul 1995 08:23:52 +0000 Subject: 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(-) (limited to 'usr.bin') diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 198532b..efd2a21 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: -- cgit v1.1