summaryrefslogtreecommitdiffstats
path: root/usr.bin/split
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-07-07 08:23:52 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-07-07 08:23:52 +0000
commitbc359d41a0c01bd670b14fa152b5d588363440b4 (patch)
treebd7cc88f8c49ee730acc7f59472f6fe5792bb510 /usr.bin/split
parentf1a09f1734d10dead04def6b8db306b69e2386a7 (diff)
downloadFreeBSD-src-bc359d41a0c01bd670b14fa152b5d588363440b4.zip
FreeBSD-src-bc359d41a0c01bd670b14fa152b5d588363440b4.tar.gz
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 <rich@freebsd.org> This should probably get pulled into 2.0.6 and 2.1.0
Diffstat (limited to 'usr.bin/split')
-rw-r--r--usr.bin/split/split.c2
1 files changed, 1 insertions, 1 deletions
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:
OpenPOWER on IntegriCloud