From a2d6aa829faa65df14ee566e455e807693cc2bd9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 31 Jul 2007 12:05:40 +0000 Subject: 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) --- source3/smbd/files.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source3/smbd/files.c') 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; } -- cgit