[hackers] [sbase] Use idiomatic return in setsid(1) || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 9 Mar 2015 00:41:21 +0100 (CET)

commit a22325e9fd0775f38118054fcf8ca4bd382c0d74
Author: FRIGN <dev_AT_frign.de>
Date: Mon Mar 9 00:25:54 2015 +0100

    Use idiomatic return in setsid(1)

diff --git a/setsid.c b/setsid.c
index b666e33..73c2ae8 100644
--- a/setsid.c
+++ b/setsid.c
_AT_@ -39,5 +39,5 @@ main(int argc, char *argv[])
         savederrno = errno;
         weprintf("execvp %s:", argv[0]);
 
- return (savederrno == ENOENT) ? 127 : 126;
+ return 126 + (savederrno == ENOENT);
 }
Received on Mon Mar 09 2015 - 00:41:21 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 09 2015 - 00:48:12 CET