sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit c514c580eca7aca1ff8fda041bb7289dbaf563f7
parent fe843056492c1133dfe3654c8d6c17c2b8d468c6
Author: FRIGN <dev@frign.de>
Date:   Wed, 30 Sep 2015 19:27:12 +0200

Print error message when size == 0 in split(1)

instead of just exiting with code 1. This could be confusing.

Diffstat:
Msplit.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/split.c b/split.c @@ -58,8 +58,10 @@ main(int argc, char *argv[]) break; case 'b': always = 1; - if ((size = parseoffset(EARGF(usage()))) <= 0) + if ((size = parseoffset(EARGF(usage()))) < 0) return 1; + if (!size) + eprintf("size needs to be positive\n"); break; case 'd': base = 10;