diff options
author | Jeremy Allison <jra@samba.org> | 2014-01-11 14:36:17 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-01-17 09:18:40 +0100 |
commit | 9b6d61c10cc6e383aa5c514ce36407217ea0e9b3 (patch) | |
tree | 21b391af0853f22e428daf729f6fd715f3cd42ed /source3/smbd | |
parent | f4c8846b3ef82b286e3e71d77228b07caf3f8216 (diff) | |
download | samba-9b6d61c10cc6e383aa5c514ce36407217ea0e9b3.tar.gz |
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 <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 584de2078d3320ba2e232e5f504191616347d0d7)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dir.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 8fa320b197..38da2ca547 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", |