From af23f2e9c58d27eca5eb2cd509ea78f8cfbc6725 Mon Sep 17 00:00:00 2001 From: Evgeniy Kozhuhovskiy Date: Sat, 26 Mar 2005 12:28:39 +0000 Subject: [PATCH] fixed compilation with gcc-2.95 --- source/ChangeLog | 4 ++++ source/bforce/nodelist.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/ChangeLog b/source/ChangeLog index 081dc9f..5d4b375 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,3 +1,7 @@ +2005-03-26 ugenk + + * bforce/nodelist.c (nodelist_open): fixed compilation with gcc-2.95 + 2005-03-22 Evgeniy Kozhuhovskiy * INSTALL.ru: added some information diff --git a/source/bforce/nodelist.c b/source/bforce/nodelist.c index cca8e77..71227bd 100644 --- a/source/bforce/nodelist.c +++ b/source/bforce/nodelist.c @@ -252,8 +252,8 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) const char *openmode; int lockmode; char *ext; /* extension */ - memset(&tmp, '\0', sizeof(s_nodelist)); char *lastname; + memset(&tmp, '\0', sizeof(s_nodelist)); /* * Select nodelist index open mode */ @@ -298,6 +298,8 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) char tmpseek[MAX_NAME]; char tmpseekdir[MAX_NAME]; char tmpname[MAX_NAME]; + struct stat ndfile; + time_t lasttime = 0; struct dirent *ndir; DIR *ndirstream; if( (ndirstream = opendir(dir)) == NULL ) @@ -308,8 +310,8 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) { strnxcpy(tmpname, name, sizeof(tmpname)); - struct stat ndfile; - time_t lasttime = 0; + + while( (ndir = readdir(ndirstream)) ) { strnxcpy(tmpseek, ndir->d_name, sizeof(tmpseek));