From: Todd C. Miller Date: Tue, 15 Jan 2002 01:45:40 +0000 (+0000) Subject: Add 'continue' statements to optimize the switch statement. From Solar. X-Git-Tag: SUDO_1_6_5~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b6d4ad876a3843951bdd734e9ead046a5ee9e93;p=sudo Add 'continue' statements to optimize the switch statement. From Solar. --- diff --git a/env.c b/env.c index 0f82158cc..b6e035aff 100644 --- a/env.c +++ b/env.c @@ -157,29 +157,32 @@ zero_env(envp) case 'H': if (strncmp("HOME=", *ep, 5) == 0) break; + continue; case 'L': if (strncmp("LOGNAME=", *ep, 8) == 0) break; + continue; case 'P': if (strncmp("PATH=", *ep, 5) == 0) { user_path = *ep + 5; /* XXX - set to sane default instead of user's? */ break; } + continue; case 'S': - if (strncmp("SHELL=", *ep, 6) == 0) { + if (strncmp("SHELL=", *ep, 6) == 0) user_shell = *ep + 6; - continue; - } else if (!user_prompt && !strncmp("SUDO_PROMPT=", *ep, 12)) { + else if (!user_prompt && !strncmp("SUDO_PROMPT=", *ep, 12)) user_prompt = *ep + 12; - continue; - } + continue; case 'T': if (strncmp("TZ=", *ep, 3) == 0) break; + continue; case 'U': if (strncmp("USER=", *ep, 5) == 0) break; + continue; default: continue; }