Use a bitwise-xor to determine incompatible flags

This commit is contained in:
sin 2014-06-30 16:35:15 +01:00
parent 06dcf39b3a
commit 5aede71236

View File

@ -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;