diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-05 15:47:52 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-03-05 15:59:36 +0100 |
commit | 82b948a8160e3b5bb80238413967ed7f5798a35c (patch) | |
tree | e9a24423c06bcf22c66a6655a3483e28f7b21b3d /source3/smbd | |
parent | 07386bb5331a22c7dcfc4fef1ae527f20ce279e6 (diff) | |
download | samba-82b948a8160e3b5bb80238413967ed7f5798a35c.tar.gz samba-82b948a8160e3b5bb80238413967ed7f5798a35c.tar.bz2 samba-82b948a8160e3b5bb80238413967ed7f5798a35c.zip |
s3: Use "goto out;" in reply_write_and_X
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 26a928f1b4..6e6e73f584 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -4494,8 +4494,7 @@ void reply_write_and_X(struct smb_request *req) if ((req->wct != 12) && (req->wct != 14)) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBwriteX); - return; + goto out; } numtowrite = SVAL(req->vwv+10, 0); @@ -4512,20 +4511,17 @@ void reply_write_and_X(struct smb_request *req) /* Can't do a recvfile write on IPC$ */ if (IS_IPC(conn)) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBwriteX); - return; + goto out; } if (numtowrite != req->unread_bytes) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBwriteX); - return; + goto out; } } else { if (smb_doff > smblen || smb_doff + numtowrite < numtowrite || smb_doff + numtowrite > smblen) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBwriteX); - return; + goto out; } } @@ -4533,12 +4529,10 @@ void reply_write_and_X(struct smb_request *req) if (IS_IPC(conn)) { if (req->unread_bytes) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBwriteX); - return; + goto out; } reply_pipe_write_and_X(req); - END_PROFILE(SMBwriteX); - return; + goto out; } fsp = file_fsp(req, SVAL(req->vwv+2, 0)); @@ -4546,14 +4540,12 @@ void reply_write_and_X(struct smb_request *req) write_through = BITSETW(req->vwv+7,0); if (!check_fsp(conn, req, fsp)) { - END_PROFILE(SMBwriteX); - return; + goto out; } if (!CHECK_WRITE(fsp)) { reply_nterror(req, NT_STATUS_ACCESS_DENIED); - END_PROFILE(SMBwriteX); - return; + goto out; } data = smb_base(req->inbuf) + smb_doff; @@ -4576,8 +4568,7 @@ void reply_write_and_X(struct smb_request *req) "used and we don't support 64 bit offsets.\n", (unsigned int)IVAL(req->vwv+12, 0) )); reply_nterror(req, NT_STATUS_ACCESS_DENIED); - END_PROFILE(SMBwriteX); - return; + goto out; } #endif /* LARGE_SMB_OFF_T */ |