diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-16 09:40:11 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-16 09:41:03 +0100 |
commit | abe75a5c8c42a15927ae4f4fb3ff69aef1569d1e (patch) | |
tree | eea63779b79bf8cb23590755ab1605f13299d293 /source4/lib | |
parent | e3cb626c61515a9c372352843fafc368ffc6e871 (diff) | |
download | samba-abe75a5c8c42a15927ae4f4fb3ff69aef1569d1e.tar.gz samba-abe75a5c8c42a15927ae4f4fb3ff69aef1569d1e.tar.bz2 samba-abe75a5c8c42a15927ae4f4fb3ff69aef1569d1e.zip |
s4:registry - use a macro for reverse byte order
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/ldb.c | 7 | ||||
-rw-r--r-- | source4/lib/registry/util.c | 7 |
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; |