summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2008-09-01 18:42:44 +0200
committerVolker Lendecke <vl@samba.org>2008-09-01 23:32:33 +0200
commitedd16eaa90df96f58ba1c224ca9316ccc0e2210d (patch)
treedfb662861a68168c47ad63a4b761b088053ea3f9
parentcad04676ca07d5ae812c7dce26684870788c7535 (diff)
downloadsamba-edd16eaa90df96f58ba1c224ca9316ccc0e2210d.tar.gz
samba-edd16eaa90df96f58ba1c224ca9316ccc0e2210d.tar.bz2
samba-edd16eaa90df96f58ba1c224ca9316ccc0e2210d.zip
Slightly simplify logic: remove an else branch
(This used to be commit 56ecec50130aa948a431427285aed4b28a5647e8)
-rw-r--r--source3/smbd/reply.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index ff38ac88cf..16f8a5b177 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3264,25 +3264,22 @@ normal_read:
}
TALLOC_FREE(req->outbuf);
return;
- } else {
- reply_outbuf(req, 12, smb_maxcnt);
+ }
- nread = read_file(fsp, smb_buf(req->outbuf), startpos,
- smb_maxcnt);
- if (nread < 0) {
- reply_unixerror(req, ERRDOS, ERRnoaccess);
- return;
- }
+ reply_outbuf(req, 12, smb_maxcnt);
- setup_readX_header((char *)req->outbuf, nread);
+ nread = read_file(fsp, smb_buf(req->outbuf), startpos, smb_maxcnt);
+ if (nread < 0) {
+ reply_unixerror(req, ERRDOS, ERRnoaccess);
+ return;
+ }
- DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
- fsp->fnum, (int)smb_maxcnt, (int)nread ) );
+ setup_readX_header((char *)req->outbuf, nread);
- chain_reply(req);
+ DEBUG( 3, ( "send_file_readX fnum=%d max=%d nread=%d\n",
+ fsp->fnum, (int)smb_maxcnt, (int)nread ) );
- return;
- }
+ chain_reply(req);
}
/****************************************************************************