From 7e297ecfa4db2c7ab720a63c7764bc0e20f8058c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 9 Sep 2007 19:34:30 +0000 Subject: r25047: Fix more warnings. (This used to be commit 69de86d2d2e49439760fbc61901eb87fb7fc5d55) --- source4/lib/registry/local.c | 3 ++- source4/lib/registry/patchfile_preg.c | 3 +-- source4/lib/registry/regf.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c index 035d556abf..1a45c0a70a 100644 --- a/source4/lib/registry/local.c +++ b/source4/lib/registry/local.c @@ -126,7 +126,8 @@ static WERROR local_open_key(TALLOC_CTX *mem_ctx, WERROR local_get_predefined_key (const struct registry_context *ctx, uint32_t key_id, struct registry_key **key) { - struct registry_local *rctx = talloc_get_type(ctx, struct registry_local); + struct registry_local *rctx = talloc_get_type(ctx, + struct registry_local); struct mountpoint *mp; for (mp = rctx->mountpoints; mp != NULL; mp = mp->next) { diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index ccabf4ca07..20bd2fad0d 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -211,8 +211,7 @@ _PUBLIC_ WERROR reg_preg_diff_load(int fd, const struct reg_diff_callbacks *call close(fd); return WERR_GENERAL_FAILURE; } - data.length = length; - data.data = talloc_memdup(mem_ctx, buf, length); + data = data_blob_talloc(mem_ctx, buf, length); /* Check if delimiter is in place (whine if it isn't) */ buf_ptr = buf; diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c index 0c40773daa..17914a8f7c 100644 --- a/source4/lib/registry/regf.c +++ b/source4/lib/registry/regf.c @@ -1664,7 +1664,7 @@ static WERROR regf_set_value(struct hive_key *key, const char *name, DATA_BLOB value_list; value_list.length = (nk->num_values+1)*4; - value_list.data = talloc_array(private_data, uint32_t, nk->num_values+1); + value_list.data = (uint8_t *)talloc_array(private_data, uint32_t, nk->num_values+1); W_ERROR_HAVE_NO_MEMORY(value_list.data); memcpy(value_list.data, values.data, nk->num_values * 4); -- cgit