ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 5aede71236bec290b43f09b9bed5d175a76deea0
parent 06dcf39b3a7e736d203167ad97adae79701c576c
Author: sin <sin@2f30.org>
Date:   Mon Jun 30 16:35:15 +0100

Use a bitwise-xor to determine incompatible flags

Diffstat:
ctrlaltdel.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ctrlaltdel.c b/ctrlaltdel.c @@ -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;