diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-08 11:21:08 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-08 09:39:36 -0800 |
commit | 1e26ecf6660ef692ee6dbce14171da49a3833132 (patch) | |
tree | 28d5320cf1e5ab89e2395025d9d12a06787a4609 | |
parent | 0cdcd255a5ab2d776d1f4d010199ca9edd06c5e9 (diff) | |
download | samba-1e26ecf6660ef692ee6dbce14171da49a3833132.tar.gz samba-1e26ecf6660ef692ee6dbce14171da49a3833132.tar.bz2 samba-1e26ecf6660ef692ee6dbce14171da49a3833132.zip |
Fix C++ warnings
(This used to be commit 01a5c3ea4bf18d99ca1c35e8c38367046e4c867b)
-rw-r--r-- | source3/client/client.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clidfs.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clifile.c | 18 | ||||
-rw-r--r-- | source3/libsmb/clilist.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clirap.c | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index bbe5572a2d..1e2f96cbf2 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4060,7 +4060,7 @@ static char **remote_completion(const char *text, int len) info.samelen = info.len = len-i-1; if (i > 0) { - info.dirmask = SMB_MALLOC(i+2); + info.dirmask = SMB_MALLOC_ARRAY(char, i+2); if (!info.dirmask) { goto cleanup; } diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index f124821e62..e0c40b52ed 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -592,7 +592,7 @@ bool cli_dfs_get_referral(TALLOC_CTX *ctx, *num_refs = 0; *refs = NULL; - param = SMB_MALLOC(2+pathlen+2); + param = SMB_MALLOC_ARRAY(char, 2+pathlen+2); if (!param) { return false; } diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 70b4fe7cb3..001a42d4b9 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -37,8 +37,8 @@ static bool cli_link_internal(struct cli_state *cli, const char *oldname, const size_t oldlen = 2*(strlen(oldname)+1); size_t newlen = 2*(strlen(newname)+1); - param = SMB_MALLOC(6+newlen+2); - data = SMB_MALLOC(oldlen+2); + param = SMB_MALLOC_ARRAY(char, 6+newlen+2); + data = SMB_MALLOC_ARRAY(char, oldlen+2); if (!param || !data) { return false; } @@ -191,7 +191,7 @@ bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, char *rparam=NULL, *rdata=NULL; char *p; - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -251,7 +251,7 @@ bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu ZERO_STRUCTP(sbuf); - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -352,7 +352,7 @@ static bool cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fna char *rparam=NULL, *rdata=NULL; char *p; - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -1662,7 +1662,7 @@ bool cli_set_ea_path(struct cli_state *cli, const char *path, const char *ea_nam char *p; bool ret; - param = SMB_MALLOC(6+srclen+2); + param = SMB_MALLOC_ARRAY(char, 6+srclen+2); if (!param) { return false; } @@ -1835,7 +1835,7 @@ bool cli_get_ea_list_path(struct cli_state *cli, const char *path, size_t srclen = 2*(strlen(path)+1); bool ret; - param = SMB_MALLOC(6+srclen+2); + param = SMB_MALLOC_ARRAY(char, 6+srclen+2); if (!param) { return false; } @@ -1940,7 +1940,7 @@ static int cli_posix_open_internal(struct cli_state *cli, const char *fname, int uint32 wire_flags = open_flags_to_wire(flags); size_t srclen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+srclen+2); + param = SMB_MALLOC_ARRAY(char, 6+srclen+2); if (!param) { return false; } @@ -2025,7 +2025,7 @@ static bool cli_posix_unlink_internal(struct cli_state *cli, const char *fname, char *p; size_t srclen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+srclen+2); + param = SMB_MALLOC_ARRAY(char, 6+srclen+2); if (!param) { return false; } diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index fc47f94aa1..2e4c360507 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -255,7 +255,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, break; } - param = SMB_MALLOC(12+nlen+last_name_raw.length+2); + param = SMB_MALLOC_ARRAY(char, 12+nlen+last_name_raw.length+2); if (!param) { break; } diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index c10900cf43..410b7cb138 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -471,7 +471,7 @@ bool cli_qpathinfo(struct cli_state *cli, char *p; size_t nlen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -560,7 +560,7 @@ bool cli_setpathinfo(struct cli_state *cli, const char *fname, char *p; size_t nlen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -660,7 +660,7 @@ bool cli_qpathinfo2(struct cli_state *cli, const char *fname, char *p; size_t nlen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return false; } @@ -989,7 +989,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin unsigned int len; size_t nlen = 2*(strlen(fname)+1); - param = SMB_MALLOC(6+nlen+2); + param = SMB_MALLOC_ARRAY(char, 6+nlen+2); if (!param) { return NT_STATUS_NO_MEMORY; } |