]> granicus.if.org Git - sudo/commitdiff
Add 'continue' statements to optimize the switch statement. From Solar.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 15 Jan 2002 01:45:40 +0000 (01:45 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 15 Jan 2002 01:45:40 +0000 (01:45 +0000)
env.c

diff --git a/env.c b/env.c
index 0f82158cc4c8b1bd472b853b6f7b38a2ec012055..b6e035affa192eab69966f29cb5f313f699ee4b6 100644 (file)
--- 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;
        }