diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-28 12:46:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:55 -0500 |
commit | e481385391a25c19d82ce93fbec11a973cf82e9f (patch) | |
tree | f4ecdd6d87a17cb7b5f8f35f97d27bc9090f23ec /source4/libcli/raw | |
parent | 6feaf6d4d60f64558190965f55b09457e940e596 (diff) | |
download | samba-e481385391a25c19d82ce93fbec11a973cf82e9f.tar.gz samba-e481385391a25c19d82ce93fbec11a973cf82e9f.tar.bz2 samba-e481385391a25c19d82ce93fbec11a973cf82e9f.zip |
r3322: fixed a bunch of warnings in the build, including one case where it was a real bug
(This used to be commit 02d5d0f685e44bd66aff4a007f0bf34c8f915574)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawsearch.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c index 89155451da..dd21eb89ea 100644 --- a/source4/libcli/raw/rawrequest.c +++ b/source4/libcli/raw/rawrequest.c @@ -548,7 +548,7 @@ static size_t smbcli_req_pull_ucs2(struct smbcli_request *req, TALLOC_CTX *mem_c of bytes consumed in the packet is returned */ size_t smbcli_req_pull_ascii(struct smbcli_request *req, TALLOC_CTX *mem_ctx, - char **dest, const char *src, int byte_len, uint_t flags) + char **dest, const char *src, int byte_len, uint_t flags) { int src_len, src_len2; ssize_t ret; diff --git a/source4/libcli/raw/rawsearch.c b/source4/libcli/raw/rawsearch.c index df44dbffa4..dd8904dfd1 100644 --- a/source4/libcli/raw/rawsearch.c +++ b/source4/libcli/raw/rawsearch.c @@ -42,6 +42,8 @@ static void smb_raw_search_backend(struct smbcli_request *req, p = req->in.data + 3; for (i=0; i < count; i++) { + char *name; + search_data.search.id.reserved = CVAL(p, 0); memcpy(search_data.search.id.name, p+1, 11); search_data.search.id.handle = CVAL(p, 12); @@ -51,7 +53,8 @@ static void smb_raw_search_backend(struct smbcli_request *req, search_data.search.write_time = raw_pull_dos_date(req->transport, p + 22); search_data.search.size = IVAL(p, 26); - smbcli_req_pull_ascii(req, mem_ctx, &search_data.search.name, p+30, 13, STR_ASCII); + smbcli_req_pull_ascii(req, mem_ctx, &name, p+30, 13, STR_ASCII); + search_data.search.name = name; if (!callback(private, &search_data)) { break; } |