[hackers] [sbase] Fix warning in chroot(1) || sin

From: <git_AT_suckless.org>
Date: Sun, 06 Oct 2013 21:36:28 +0200

commit 4b30e39348245ef99e3c2030295e54ff01c8cf21
Author: sin <sin_AT_2f30.org>
Date: Sun Oct 6 20:35:30 2013 +0100

    Fix warning in chroot(1)
    
    chroot.c:12:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      if(aux = getenv("SHELL"))
      ^

diff --git a/chroot.c b/chroot.c
index 4cef49b..52786e5 100644
--- a/chroot.c
+++ b/chroot.c
_AT_@ -9,7 +9,7 @@ main(int argc, char **argv)
 {
         char *shell[] = {"/bin/sh", "-i", NULL}, *aux;
 
- if(aux = getenv("SHELL"))
+ if((aux = getenv("SHELL")))
                 shell[0] = aux;
 
         if(argc < 2)
Received on Sun Oct 06 2013 - 21:36:28 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 06 2013 - 21:48:11 CEST