diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-02 01:21:53 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-02 09:22:40 +0100 |
commit | af7cf4f992d8bb3b6677c094c85b9b1055a6ffc9 (patch) | |
tree | 1f9dacdf91bf1e801bca22f044e5e561e099353e /source3/include | |
parent | a31fab81568ed2b4314ea05740423aceb5d7c977 (diff) | |
download | samba-af7cf4f992d8bb3b6677c094c85b9b1055a6ffc9.tar.gz samba-af7cf4f992d8bb3b6677c094c85b9b1055a6ffc9.tar.bz2 samba-af7cf4f992d8bb3b6677c094c85b9b1055a6ffc9.zip |
Remove some direct inbuf references by adding smbreq_bufrem
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb_macros.h | 2 | ||||
-rw-r--r-- | source3/include/srvstr.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 89d8994eaf..46ca236553 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -131,6 +131,8 @@ /* the remaining number of bytes in smb buffer 'buf' from pointer 'p'. */ #define smb_bufrem(buf, p) (smb_buflen(buf)-PTR_DIFF(p, smb_buf(buf))) +#define smbreq_bufrem(req, p) (req->buflen - PTR_DIFF(p, req->buf)) + /* Note that chain_size must be available as an extern int to this macro. */ #define smb_offset(p,buf) (PTR_DIFF(p,buf+4) + chain_size) diff --git a/source3/include/srvstr.h b/source3/include/srvstr.h index d2de6805d3..7e7d8a2e92 100644 --- a/source3/include/srvstr.h +++ b/source3/include/srvstr.h @@ -27,4 +27,4 @@ #define srvstr_pull_req_talloc(ctx, req_, dest, src, flags) \ pull_string_talloc(ctx, req_->inbuf, req_->flags2, dest, src, \ - smb_bufrem(req_->inbuf, src), flags) + smbreq_bufrem(req_, src), flags) |