- path = talloc_asprintf(ctx, "%s/%s", key, oldkeyname);
+ path = talloc_asprintf(ctx, "%s/%s/%s",
+ REG_VALUE_PREFIX,
+ key,
+ oldkeyname );
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
- status = dbwrap_delete_bystring(regdb, path);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Deleting %s failed\n", path));
- goto cancel;
- }
-
+ /* Ignore errors here, we might have no values around */
+ dbwrap_delete_bystring(regdb, path);
- path = talloc_asprintf(ctx, "%s/%s/%s",
- REG_VALUE_PREFIX,
- key,
- oldkeyname );
+
+ path = talloc_asprintf(ctx, "%s/%s", key, oldkeyname);
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
if (!path) {
goto cancel;
}
-
- /*
- * Ignore errors here, we might have no values around
- */
- dbwrap_delete_bystring(regdb, path);
+ status = dbwrap_delete_bystring(regdb, path);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Deleting %s failed\n", path));
+ goto cancel;
+ }