- add a few basic tests for pidof(8)
[oweals/busybox.git] / libbb / run_shell.c
index 67ff2a5f82566d5ec818c14178a5fe48d93b8479..6d084eead80ce5243ed6c801cc5c3b8350601818 100644 (file)
@@ -84,11 +84,8 @@ void run_shell ( const char *shell, int loginshell, const char *command, const c
 
        args [0] = bb_get_last_path_component ( bb_xstrdup ( shell ));
 
-       if ( loginshell ) {
-               char *args0;
-               bb_xasprintf ( &args0, "-%s", args [0] );
-               args [0] = args0;
-       }
+       if ( loginshell ) 
+               args [0] = bb_xasprintf ("-%s", args [0]);
 
        if ( command ) {
                args [argno++] = "-c";