summaryrefslogtreecommitdiff
path: root/main/reentrancy.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/reentrancy.c')
-rw-r--r--main/reentrancy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/reentrancy.c b/main/reentrancy.c
index 4677d52ea2..866cf4273e 100644
--- a/main/reentrancy.c
+++ b/main/reentrancy.c
@@ -127,11 +127,10 @@ PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
if (!ptr && errno != 0)
ret = errno;
- if (entry && ptr)
+ if (ptr)
memcpy(entry, ptr, sizeof(*ptr));
- if (result)
- *result = ptr;
+ *result = ptr;
local_unlock(READDIR_R);