mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
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
This commit is contained in:
parent
ef59de8517
commit
a3f8d23a48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9427
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue