Avoid double call to getenv in chroot

This commit is contained in:
Roberto E. Vargas Caballero 2013-07-20 13:19:32 +02:00
parent c258d7d0b6
commit 5e9c4d781b
1 changed files with 3 additions and 3 deletions

View File

@ -7,10 +7,10 @@ static void usage(void);
int
main(int argc, char **argv)
{
char *shell[] = {"/bin/sh", "-i", NULL};
char *shell[] = {"/bin/sh", "-i", NULL}, *aux;
if(getenv("SHELL"))
shell[0] = getenv("SHELL");
if(aux = getenv("SHELL"))
shell[0] = aux;
if(argc < 2)
usage();