[hackers] [dmenu] code-style for pledge: check the return code -1, not < 0 || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Fri, 25 May 2018 13:08:59 +0200 (CEST)

commit 851b73d178c8d7665c6d8a0bc34dbd4f9d1aa77b
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri May 25 13:07:17 2018 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri May 25 13:07:17 2018 +0200

    code-style for pledge: check the return code -1, not < 0
    
    this is the proper idiom

diff --git a/dmenu.c b/dmenu.c
index 3b2f3ec..5c835dd 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -750,7 +750,7 @@ main(int argc, char *argv[])
         lrpad = drw->fonts->h;
 
 #ifdef __OpenBSD__
- if (pledge("stdio rpath", NULL) < 0)
+ if (pledge("stdio rpath", NULL) == -1)
                 die("pledge");
 #endif
 
Received on Fri May 25 2018 - 13:08:59 CEST

This archive was generated by hypermail 2.3.0 : Fri May 25 2018 - 13:12:38 CEST