Slightly simplify logic: remove an else branch
authorVolker Lendecke <vl@sernet.de>
Mon, 1 Sep 2008 16:42:44 +0000 (18:42 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 1 Sep 2008 21:32:33 +0000 (23:32 +0200)
(This used to be commit 56ecec50130aa948a431427285aed4b28a5647e8)

source3/smbd/reply.c

index ff38ac88cfef60d5fd37ee34431c875d974f8b9c..16f8a5b1776815d78ef7f8d1be8db64f735758ba 100644 (file)
@@ -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);
 }
 
 /****************************************************************************