Skip to content

Commit 32c6ac9

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix technically incorrect sizeof
2 parents e118147 + 4f233e3 commit 32c6ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/network.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
229229
for (n = 1; (sai = sai->ai_next) != NULL; n++)
230230
;
231231

232-
*sal = safe_emalloc((n + 1), sizeof(*sal), 0);
232+
*sal = safe_emalloc((n + 1), sizeof(**sal), 0);
233233
sai = res;
234234
sap = *sal;
235235

@@ -264,7 +264,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
264264
in = *((struct in_addr *) host_info->h_addr);
265265
}
266266

267-
*sal = safe_emalloc(2, sizeof(*sal), 0);
267+
*sal = safe_emalloc(2, sizeof(**sal), 0);
268268
sap = *sal;
269269
*sap = emalloc(sizeof(struct sockaddr_in));
270270
(*sap)->sa_family = AF_INET;

0 commit comments

Comments
 (0)