Use a bitwise-xor to determine incompatible flags
This commit is contained in:
parent
06dcf39b3a
commit
5aede71236
@ -30,8 +30,7 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
} ARGEND;
|
||||
|
||||
if (argc > 0 || (hflag != 0 && sflag != 0) ||
|
||||
(hflag == 0 && sflag == 0))
|
||||
if (argc > 0 || (hflag ^ sflag) == 0)
|
||||
usage();
|
||||
|
||||
cmd = hflag ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
|
||||
|
Loading…
Reference in New Issue
Block a user