diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-03-29 18:43:38 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-03-29 18:44:00 +0200 |
commit | a5e6b5589b9d8498740a289dba2d56d3eb14af72 (patch) | |
tree | 54d75935707d260d1e886ce4a21e1bd884f6a7c7 | |
parent | 38fc9dfdc6046e21cd8f0127e2cd88f72f81b3b3 (diff) | |
download | samba-a5e6b5589b9d8498740a289dba2d56d3eb14af72.tar.gz samba-a5e6b5589b9d8498740a289dba2d56d3eb14af72.tar.bz2 samba-a5e6b5589b9d8498740a289dba2d56d3eb14af72.zip |
registry: Fix compilation.
-rw-r--r-- | source4/lib/registry/patchfile.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/pyregistry.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/util.c | 10 |
3 files changed, 5 insertions, 9 deletions
diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c index 9ca00bd9b0..a01c3554c4 100644 --- a/source4/lib/registry/patchfile.c +++ b/source4/lib/registry/patchfile.c @@ -435,7 +435,7 @@ static WERROR reg_diff_apply_del_key(void *_ctx, const char *key_name) /* therefore all children recursively and the "WERR_BADFILE" result is */ /* expected. */ - reg_key_del_abs(ctx, ctx, key_name); + reg_key_del_abs(ctx, key_name); return WERR_OK; } diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index d2302af6b9..d7295b573c 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -61,7 +61,7 @@ static PyObject *py_key_del_abs(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "s", &path)) return NULL; - result = reg_key_del_abs(NULL, ctx, path); + result = reg_key_del_abs(ctx, path); PyErr_WERROR_IS_ERR_RAISE(result); Py_RETURN_NONE; diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index ee3bb151b2..69c49f2a28 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -156,7 +156,7 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, case REG_BINARY: *data = strhex_to_data_blob(mem_ctx, data_str); break; - case REG_DWORD: { + case REG_DWORD: case REG_DWORD_BIG_ENDIAN: { uint32_t tmp = strtol(data_str, NULL, 0); *data = data_blob_talloc(mem_ctx, NULL, sizeof(uint32_t)); @@ -245,7 +245,6 @@ static WERROR get_abs_parent(TALLOC_CTX *mem_ctx, struct registry_context *ctx, WERROR reg_key_del_abs(struct registry_context *ctx, const char *path) { struct registry_key *parent; - char *n; const char *n; TALLOC_CTX *mem_ctx = talloc_init("reg_key_del_abs"); WERROR error; @@ -257,12 +256,9 @@ WERROR reg_key_del_abs(struct registry_context *ctx, const char *path) error = get_abs_parent(mem_ctx, ctx, path, &parent, &n); if (W_ERROR_IS_OK(error)) { error = reg_key_del(mem_ctx, parent, n); - - talloc_free(parent); - talloc_free(n); } - talloc_free(mem_ctx); + talloc_free(mem_ctx); return error; } @@ -273,7 +269,7 @@ WERROR reg_key_add_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, struct registry_key **result) { struct registry_key *parent; - char *n; + const char *n; WERROR error; *result = NULL; |