1
0
mirror of git://git.suckless.org/sbase synced 2024-12-22 23:13:44 +00:00

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.
This commit is contained in:
FRIGN 2015-03-11 13:31:08 +01:00
parent 695153ac18
commit e11717ab3b

2
cmp.c
View File

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