summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/registry/patchfile_preg.c14
-rw-r--r--source4/lib/registry/regf.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c
index 26b57e4f45..e9801bb425 100644
--- a/source4/lib/registry/patchfile_preg.c
+++ b/source4/lib/registry/patchfile_preg.c
@@ -64,7 +64,7 @@ static WERROR reg_preg_diff_set_value(void *_data, const char *key_name,
const char *value_name,
uint32_t value_type, DATA_BLOB value_data)
{
- struct preg_data *data = _data;
+ struct preg_data *data = (struct preg_data *)_data;
uint32_t buf;
preg_write_utf16(data->ic, data->fd, "[");
@@ -86,12 +86,12 @@ static WERROR reg_preg_diff_set_value(void *_data, const char *key_name,
static WERROR reg_preg_diff_del_key(void *_data, const char *key_name)
{
- struct preg_data *data = _data;
+ struct preg_data *data = (struct preg_data *)_data;
char *parent_name;
DATA_BLOB blob;
parent_name = talloc_strndup(data->ctx, key_name, strrchr(key_name, '\\')-key_name);
- blob.data = (void *)talloc_strndup(data->ctx, key_name+(strrchr(key_name, '\\')-key_name)+1,
+ blob.data = (uint8_t *)talloc_strndup(data->ctx, key_name+(strrchr(key_name, '\\')-key_name)+1,
strlen(key_name)-(strrchr(key_name, '\\')-key_name));
blob.length = strlen((char *)blob.data)+1;
@@ -103,13 +103,13 @@ static WERROR reg_preg_diff_del_key(void *_data, const char *key_name)
static WERROR reg_preg_diff_del_value(void *_data, const char *key_name,
const char *value_name)
{
- struct preg_data *data = _data;
+ struct preg_data *data = (struct preg_data *)_data;
char *val;
DATA_BLOB blob;
val = talloc_asprintf(data->ctx, "**Del.%s", value_name);
- blob.data = (void *)talloc(data->ctx, uint32_t);
+ blob.data = (uint8_t *)talloc(data->ctx, uint32_t);
*(uint32_t *)blob.data = 0;
blob.length = 4;
return reg_preg_diff_set_value(data, key_name, val, REG_DWORD, blob);
@@ -117,10 +117,10 @@ static WERROR reg_preg_diff_del_value(void *_data, const char *key_name,
static WERROR reg_preg_diff_del_all_values(void *_data, const char *key_name)
{
- struct preg_data *data = _data;
+ struct preg_data *data = (struct preg_data *)_data;
DATA_BLOB blob;
- blob.data = (void *)talloc(data->ctx, uint32_t);
+ blob.data = (uint8_t *)talloc(data->ctx, uint32_t);
*(uint32_t *)blob.data = 0;
blob.length = 4;
diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c
index 4cbcb09a10..fbb9cd9de9 100644
--- a/source4/lib/registry/regf.c
+++ b/source4/lib/registry/regf.c
@@ -543,7 +543,7 @@ static WERROR regf_get_value(TALLOC_CTX *ctx, struct hive_key *key,
if (vk->data_length & 0x80000000) {
vk->data_length &=~0x80000000;
- data->data = talloc_memdup(ctx, (uint8_t *)&vk->data_offset, vk->data_length);
+ data->data = (uint8_t *)talloc_memdup(ctx, (uint8_t *)&vk->data_offset, vk->data_length);
data->length = vk->data_length;
} else {
*data = hbin_get(regf, vk->data_offset);