summaryrefslogtreecommitdiff
path: root/source3/registry/reg_util_internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry/reg_util_internal.c')
-rw-r--r--source3/registry/reg_util_internal.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/registry/reg_util_internal.c b/source3/registry/reg_util_internal.c
index a1aeaa405c..b15015b988 100644
--- a/source3/registry/reg_util_internal.c
+++ b/source3/registry/reg_util_internal.c
@@ -97,12 +97,11 @@ char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname )
char *nkeyname;
/* skip leading '\' chars */
- p = (char *)keyname;
- while (*p == '\\') {
- p++;
+ while (*keyname == '\\') {
+ keyname++;
}
- nkeyname = talloc_strdup(ctx, p);
+ nkeyname = talloc_strdup(ctx, keyname);
if (nkeyname == NULL) {
return NULL;
}