From ad97bcf813d5f06df4711896eefc99c0c32651cc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 15 Sep 2007 20:24:35 +0000 Subject: r25184: Fix some C++ warnings and an uninitialized variable (This used to be commit b64df8a3c504ab7749c21ffb26e4771a9a0a328f) --- source3/lib/charcnv.c | 2 +- source3/lib/util_str.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 26581ba305..a8fb95df06 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -1493,7 +1493,7 @@ static size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx, /* Have we got space to append the '\0' ? */ if (size <= dest_len) { /* No, realloc. */ - dest = TALLOC_REALLOC(ctx, dest, + dest = TALLOC_REALLOC_ARRAY(ctx, dest, char, dest_len+1); if (!dest) { /* talloc fail. */ diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index c2eeb12544..db5775b79f 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -995,7 +995,7 @@ BOOL in_list(const char *s, const char *list, BOOL casesensitive) /* We know a token can't be larger * than the entire list. */ - tok = SMB_MALLOC(bufsize+1); + tok = SMB_MALLOC_ARRAY(char, bufsize+1); if (!tok) { return False; } -- cgit