Skip to content

Commit 32efc76

Browse files
authored
Use return value of getpwuid_r(), not errno (#13969)
1 parent c3acfb1 commit 32efc76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/posix/posix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ PHP_FUNCTION(posix_getpwuid)
952952
try_again:
953953
err = getpwuid_r(uid, &_pw, pwbuf, pwbuflen, &retpwptr);
954954
if (err || retpwptr == NULL) {
955-
if (errno == ERANGE) {
955+
if (err == ERANGE) {
956956
pwbuflen *= 2;
957957
pwbuf = erealloc(pwbuf, pwbuflen);
958958
goto try_again;

0 commit comments

Comments
 (0)