summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/smbd/reply.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 6e41de4ec9a..b17fa1949bc 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -2590,9 +2590,7 @@ int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length
if (startpos > sbuf.st_size) {
smb_maxcnt = 0;
- }
-
- if (smb_maxcnt > (sbuf.st_size - startpos)) {
+ } else if (smb_maxcnt > (sbuf.st_size - startpos)) {
smb_maxcnt = (sbuf.st_size - startpos);
}