sbase

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

commit e11717ab3b8d0022372aac49389f125ffc8a8ca7
parent 695153ac183e3e2aaea0961339007f34bf98d47c
Author: FRIGN <dev@frign.de>
Date:   Wed, 11 Mar 2015 13:31:08 +0100

Print usage() when -l and -s are both given in cmp(1)

This is unspecified behaviour, not undefined by POSIX. So we
break out here.

Diffstat:
Mcmp.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmp.c b/cmp.c @@ -28,7 +28,7 @@ main(int argc, char *argv[]) usage(); } ARGEND; - if (argc != 2) + if (argc != 2 || (lflag && sflag)) usage(); for (n = 0; n < 2; n++) {