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
1 changed files with 1 additions and 1 deletions

2
cmp.c
View File

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