1
0
mirror of git://git.suckless.org/sbase synced 2024-12-25 08:22:44 +00:00

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

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();