ext/standard/info.c: Remove unreachable conditional branch

This commit is contained in:
Gina Peter Bnayard 2024-08-13 16:59:43 +02:00
parent 6e2bbc49c7
commit 0b8fbacd58

View File

@ -680,13 +680,12 @@ PHPAPI zend_string *php_get_uname(char mode)
} else if (mode == 'v') { } else if (mode == 'v') {
char *winver = php_get_windows_name(); char *winver = php_get_windows_name();
dwBuild = (DWORD)(HIWORD(dwVersion)); dwBuild = (DWORD)(HIWORD(dwVersion));
if (winver == NULL) {
return strpprintf(0, "build %d", dwBuild); ZEND_ASSERT(winver != NULL);
} else {
zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver); zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
efree(winver); efree(winver);
return build_with_version; return build_with_version;
}
} else if (mode == 'm') { } else if (mode == 'm') {
php_get_windows_cpu(tmp_uname, sizeof(tmp_uname)); php_get_windows_cpu(tmp_uname, sizeof(tmp_uname));
php_uname = tmp_uname; php_uname = tmp_uname;