Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f4ecfac

Browse files
committed
remove nesting: return early
1 parent 62b362e commit f4ecfac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎main/php_ini.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -433,23 +433,23 @@ static char* get_env_location(const char *envname)
433433
size = GetEnvironmentVariableA(envname, &dummybuf, 0);
434434
if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
435435
/* The environment variable doesn't exist. */
436-
env_location = "";
437-
} else {
438-
if (size == 0) {
439-
env_location = "";
440-
} else {
441-
size = GetEnvironmentVariableA(envname, phprc_path, size);
442-
if (size == 0) {
443-
env_location = "";
444-
} else {
445-
env_location = phprc_path;
446-
}
447-
}
436+
return "";
448437
}
438+
439+
if (size == 0) {
440+
return "";
441+
}
442+
443+
size = GetEnvironmentVariableA(envname, phprc_path, size);
444+
if (size == 0) {
445+
return "";
446+
}
447+
448+
env_location = phprc_path;
449449
}
450450
#else
451451
if (!env_location) {
452-
env_location= "";
452+
return "";
453453
}
454454
#endif
455455

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /