From 584de2078d3320ba2e232e5f504191616347d0d7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 Jan 2014 14:36:17 -0800 Subject: [PATCH] s3:dir - In the old SMB1 search code, rename offset to wire_offset to distinguish between wire and native offsets. Rename uint32 type to correct uint32_t. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- source3/smbd/dir.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 8fa320b197b..38da2ca5479 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -903,16 +903,16 @@ bool dptr_fill(struct smbd_server_connection *sconn, { unsigned char *buf = (unsigned char *)buf1; struct dptr_struct *dptr = dptr_get(sconn, key, false); - uint32 offset; + uint32_t wire_offset; if (!dptr) { DEBUG(1,("filling null dirptr %d\n",key)); return(False); } - offset = (uint32)TellDir(dptr->dir_hnd); + wire_offset = (uint32_t)TellDir(dptr->dir_hnd); DEBUG(6,("fill on key %u dirptr 0x%lx now at %d\n",key, - (long)dptr->dir_hnd,(int)offset)); + (long)dptr->dir_hnd,(int)wire_offset)); buf[0] = key; - SIVAL(buf,1,offset); + SIVAL(buf,1,wire_offset); return(True); } @@ -925,7 +925,7 @@ struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn, { unsigned int key = *(unsigned char *)buf; struct dptr_struct *dptr = dptr_get(sconn, key, false); - uint32 offset; + uint32_t wire_offset; long seekoff; if (!dptr) { @@ -933,11 +933,11 @@ struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn, return(NULL); } *num = key; - offset = IVAL(buf,1); - if (offset == (uint32)-1) { + wire_offset = IVAL(buf,1); + if (wire_offset == (uint32_t)-1) { seekoff = END_OF_DIRECTORY_OFFSET; } else { - seekoff = (long)offset; + seekoff = (long)wire_offset; } SeekDir(dptr->dir_hnd,seekoff); DEBUG(3,("fetching dirptr %d for path %s at offset %d\n", -- 2.11.4.GIT