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++) {