Skip to content

Commit 7a7497e

Browse files
author
Ilia Alshanetsky
committed
Fixed the \0 check in previous patch.
1 parent 3374483 commit 7a7497e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/dns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static char *php_gethostbyaddr(char *ip)
128128
hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
129129
#endif
130130

131-
if (!hp || hp->h_name == NULL || hp->h_name == '\0') {
131+
if (!hp || hp->h_name == NULL || hp->h_name[0] == '\0') {
132132
return estrdup(ip);
133133
}
134134

0 commit comments

Comments
 (0)