diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-05 10:41:40 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-05-05 10:41:40 -0700 |
commit | 10a628b6e181af07f0c43db36ba017411b4eaaaa (patch) | |
tree | c3e4414ef7c17b352b01f14443f9abaeb6f82bd5 /source3 | |
parent | 1c407da7c357d7cad693a152c0eecafc3dc97c61 (diff) | |
download | samba-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.c | 7 |
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; } |