From: Volker Lendecke Date: Mon, 1 Sep 2008 16:42:44 +0000 (+0200) Subject: Slightly simplify logic: remove an else branch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56ecec50130aa948a431427285aed4b28a5647e8;p=thirdparty%2Fsamba.git Slightly simplify logic: remove an else branch --- diff --git a/source/smbd/reply.c b/source/smbd/reply.c index ff38ac88cfe..16f8a5b1776 100644 --- a/source/smbd/reply.c +++ b/source/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); } /****************************************************************************