summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 10:41:40 -0700
committerJeremy Allison <jra@samba.org>2011-05-05 10:41:40 -0700
commit10a628b6e181af07f0c43db36ba017411b4eaaaa (patch)
treec3e4414ef7c17b352b01f14443f9abaeb6f82bd5 /source3
parent1c407da7c357d7cad693a152c0eecafc3dc97c61 (diff)
downloadsamba-10a628b6e181af07f0c43db36ba017411b4eaaaa.tar.gz
samba-10a628b6e181af07f0c43db36ba017411b4eaaaa.tar.bz2
samba-10a628b6e181af07f0c43db36ba017411b4eaaaa.zip
Don't reuse a non-const pointer when manipulating const.
Diffstat (limited to 'source3')
-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;
}