summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-31 12:05:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:07 -0500
commita2d6aa829faa65df14ee566e455e807693cc2bd9 (patch)
tree4d7088915b91a717884a301a14d0d5ddac98b95f /source3/smbd/files.c
parent3d769de244b9193e309a7e1c8f602985b0c1fa75 (diff)
downloadsamba-a2d6aa829faa65df14ee566e455e807693cc2bd9.tar.gz
samba-a2d6aa829faa65df14ee566e455e807693cc2bd9.tar.bz2
samba-a2d6aa829faa65df14ee566e455e807693cc2bd9.zip
r24102: Pass the fid instead of inbuf and an offset to file_fsp.
This removes the buf==NULL condition in file_fsp(), but wherever it is called we do have a buffer anyway. Volker (This used to be commit d70a1f82fed64fa332f16407bea7c6671f48c59a)
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r--source3/smbd/files.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 07dec80a47..9d27c69a6b 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -487,7 +487,7 @@ files_struct *file_fnum(uint16 fnum)
Get an fsp from a packet given the offset of a 16 bit fnum.
****************************************************************************/
-files_struct *file_fsp(const char *buf, int where)
+files_struct *file_fsp(uint16 fid)
{
files_struct *fsp;
@@ -495,11 +495,7 @@ files_struct *file_fsp(const char *buf, int where)
return chain_fsp;
}
- if (!buf) {
- return NULL;
- }
-
- fsp = file_fnum(SVAL(buf, where));
+ fsp = file_fnum(fid);
if (fsp) {
chain_fsp = fsp;
}