Skip to content

Commit 9c2043d

Browse files
committed
- MFH: Working with unintialized errno (#46917, noticed by Jost Boekemeier)
1 parent bfcea7f commit 9c2043d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main/network.c

+1
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,7 @@ PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout)
11471147
tv.tv_sec = timeout / 1000;
11481148
tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
11491149
}
1150+
errno = 0;
11501151
n = select(max_fd + 1, &rset, &wset, &eset, timeout >= 0 ? &tv : NULL);
11511152

11521153
if (n >= 0) {

0 commit comments

Comments
 (0)