commit 4b30e39348245ef99e3c2030295e54ff01c8cf21
Author: sin <[email protected]>
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
@@ -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)


Reply via email to