cvs: php4 /main reentrancy.c
| From: | Jani Taskinen | Date: | Tue, 28 Nov 2000 09:13:23 +0000 |
| Subject: | cvs: php4 /main reentrancy.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2811@lists.php.net to get a copy of this message | ||
sniper Tue Nov 28 01:13:23 2000 EDT
Modified files:
/php4/main reentrancy.c
Log:
@- Fixed a bug which made readdir() unusable in some systems. (Jani)
# Bug report: #7390
Index: php4/main/reentrancy.c
diff -u php4/main/reentrancy.c:1.23 php4/main/reentrancy.c:1.24
--- php4/main/reentrancy.c:1.23 Mon Jun 12 07:11:39 2000
+++ php4/main/reentrancy.c Tue Nov 28 01:13:22 2000
@@ -104,15 +104,15 @@
errno = 0;
ret = readdir_r(dirp, entry);
-
- if (ret == 0)
- *result = entry;
- else if (errno == 0) {
+
+ if (!ret || errno != 0) {
*result = NULL;
- ret = 0;
+ } else {
+ *result = entry;
}
+
+ return errno;
- return ret;
#else
struct dirent *ptr;
int ret = 0;