summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/ldb.c7
-rw-r--r--source4/lib/registry/util.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 83905f3e71..a86dacd34b 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -231,11 +231,8 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx,
conv_str = talloc_asprintf(msg, "0x%8.8x",
IVAL(data.data, 0));
} else {
- conv_str = talloc_asprintf(msg, "0x%2.2x%2.2x%2.2x%2.2x",
- CVAL(data.data, 0),
- CVAL(data.data, 1),
- CVAL(data.data, 2),
- CVAL(data.data, 3));
+ conv_str = talloc_asprintf(msg, "0x%8.8x",
+ RIVAL(data.data, 0));
}
if (conv_str == NULL) {
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 56212906de..7afca62813 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -91,11 +91,8 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
ret = talloc_asprintf(mem_ctx, "0x%8.8x",
IVAL(data.data, 0));
} else {
- ret = talloc_asprintf(mem_ctx, "0x%2.2x%2.2x%2.2x%2.2x",
- CVAL(data.data, 0),
- CVAL(data.data, 1),
- CVAL(data.data, 2),
- CVAL(data.data, 3));
+ ret = talloc_asprintf(mem_ctx, "0x%8.8x",
+ RIVAL(data.data, 0));
}
}
break;