From 13ac4ad52187df7093904d4ad9c47d51bd1eda6f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 6 Feb 2010 12:42:29 +1100 Subject: s3-smbd: update to use new DLIST macros (cherry picked from commit 365b408c458c848a818637d9b36a0423aeb1ba54) --- source3/smbd/dir.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/smbd/dir.c') diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 3fe3218762..b1e9734681 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -153,8 +153,7 @@ static void dptr_idleoldest(struct smbd_server_connection *sconn) /* * Go to the end of the list. */ - for(dptr = sconn->smb1.searches.dirptrs; dptr && dptr->next; dptr = dptr->next) - ; + dptr = DLIST_TAIL(sconn->smb1.searches.dirptrs); if(!dptr) { DEBUG(0,("No dptrs available to idle ?\n")); @@ -165,7 +164,7 @@ static void dptr_idleoldest(struct smbd_server_connection *sconn) * Idle the oldest pointer. */ - for(; dptr; dptr = dptr->prev) { + for(; dptr; dptr = DLIST_PREV(dptr)) { if (dptr->dir_hnd) { dptr_idle(dptr); return; @@ -394,7 +393,7 @@ static void dptr_close_oldest(struct smbd_server_connection *sconn, * one of the new dnum handles. */ - for(; dptr; dptr = dptr->prev) { + for(; dptr; dptr = DLIST_PREV(dptr)) { if ((old && (dptr->dnum < 256) && !dptr->expect_close) || (!old && (dptr->dnum > 255))) { dptr_close_internal(dptr); -- cgit