From 85d1b50a2af8ab3f1defd35526c65cc44e7ef9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 2 Jul 1998 23:02:31 +0200 Subject: [PATCH] Fixed another bug in the POSIX readdir_r() code. Rev: src/modules/files/efuns.c:1.56 --- src/modules/files/efuns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c index ab19180037..8414058454 100644 --- a/src/modules/files/efuns.c +++ b/src/modules/files/efuns.c @@ -22,7 +22,7 @@ #include "file_machine.h" #include "file.h" -RCSID("$Id: efuns.c,v 1.55 1998/07/02 19:49:59 grubba Exp $"); +RCSID("$Id: efuns.c,v 1.56 1998/07/02 21:02:31 grubba Exp $"); #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -482,6 +482,7 @@ void f_get_dir(INT32 args) * at end of dir it sets the third arg to NULL. */ d = NULL; + errno = 0; if ((err = readdir_r(dir, tmp, &d)) || !d) { if (err == -1) { err = errno; -- GitLab