diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-07 18:11:42 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-07 18:41:59 +1100 |
commit | 5ab6a8d077712c789bbd245f5f7cac7fc71cba81 (patch) | |
tree | e4709f3b2a0fef25279fc812fe2df906b3f62215 /source4/lib/registry/patchfile_preg.c | |
parent | 70534adee10fc6f5bba2d9304668dc6508e5de5a (diff) | |
download | samba-5ab6a8d077712c789bbd245f5f7cac7fc71cba81.tar.gz samba-5ab6a8d077712c789bbd245f5f7cac7fc71cba81.tar.bz2 samba-5ab6a8d077712c789bbd245f5f7cac7fc71cba81.zip |
s4-registry: fixed byte order assumptions
the registry tests were broken on big-endian systems
Diffstat (limited to 'source4/lib/registry/patchfile_preg.c')
-rw-r--r-- | source4/lib/registry/patchfile_preg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index 30a9aea2a5..d7b4bc3730 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -109,7 +109,7 @@ static WERROR reg_preg_diff_del_value(void *_data, const char *key_name, val = talloc_asprintf(data->ctx, "**Del.%s", value_name); blob.data = (uint8_t *)talloc(data->ctx, uint32_t); - *(uint32_t *)blob.data = 0; + SIVAL(blob.data, 0, 0); blob.length = 4; return reg_preg_diff_set_value(data, key_name, val, REG_DWORD, blob); } @@ -120,7 +120,7 @@ static WERROR reg_preg_diff_del_all_values(void *_data, const char *key_name) DATA_BLOB blob; blob.data = (uint8_t *)talloc(data->ctx, uint32_t); - *(uint32_t *)blob.data = 0; + SIVAL(blob.data, 0, 0); blob.length = 4; return reg_preg_diff_set_value(data, key_name, "**DelVals.", REG_DWORD, blob); |