Skip to content

Commit 0b8fbac

Browse files
committed
ext/standard/info.c: Remove unreachable conditional branch
1 parent 6e2bbc4 commit 0b8fbac

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ext/standard/info.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -680,13 +680,12 @@ PHPAPI zend_string *php_get_uname(char mode)
680680
} else if (mode == 'v') {
681681
char *winver = php_get_windows_name();
682682
dwBuild = (DWORD)(HIWORD(dwVersion));
683-
if (winver == NULL) {
684-
return strpprintf(0, "build %d", dwBuild);
685-
} else {
686-
zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
687-
efree(winver);
688-
return build_with_version;
689-
}
683+
684+
ZEND_ASSERT(winver != NULL);
685+
686+
zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
687+
efree(winver);
688+
return build_with_version;
690689
} else if (mode == 'm') {
691690
php_get_windows_cpu(tmp_uname, sizeof(tmp_uname));
692691
php_uname = tmp_uname;

0 commit comments

Comments
 (0)