Skip to content

Commit a1735a4

Browse files
committed
remove nesting: return early
1 parent 25e3547 commit a1735a4

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
@@ -432,23 +432,23 @@ static char* get_env_location(const char *envname)
432432
size = GetEnvironmentVariableA(envname, &dummybuf, 0);
433433
if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
434434
/* The environment variable doesn't exist. */
435-
env_location = "";
436-
} else {
437-
if (size == 0) {
438-
env_location = "";
439-
} else {
440-
size = GetEnvironmentVariableA(envname, phprc_path, size);
441-
if (size == 0) {
442-
env_location = "";
443-
} else {
444-
env_location = phprc_path;
445-
}
446-
}
435+
return "";
447436
}
437+
438+
if (size == 0) {
439+
return "";
440+
}
441+
442+
size = GetEnvironmentVariableA(envname, phprc_path, size);
443+
if (size == 0) {
444+
return "";
445+
}
446+
447+
env_location = phprc_path;
448448
}
449449
#else
450450
if (!env_location) {
451-
env_location = "";
451+
return "";
452452
}
453453
#endif
454454

0 commit comments

Comments
 (0)