Fix issues addressed by Jelmer:
authorWilco Baan Hofman <wilco@baanhofman.nl>
Sun, 3 Oct 2010 04:19:12 +0000 (06:19 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 3 Oct 2010 13:31:38 +0000 (15:31 +0200)
 * Add a comment about why the reg_strhex_to_data_blob was added
 * Fix int which should've been a boolean

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
source4/lib/registry/regf.c
source4/lib/registry/util.c

index 872a9050bfc39f354a334bb243781ab04d4de4be..5ca7b7c66cdcb18d423c158c38b49a1e12e9490d 100644 (file)
@@ -52,7 +52,7 @@ struct regf_data {
        time_t last_write;
 };
 
-static WERROR regf_save_hbin(struct regf_data *data, int flush);
+static WERROR regf_save_hbin(struct regf_data *data, bool flush);
 
 struct regf_key_data {
        struct hive_key key;
@@ -1973,7 +1973,7 @@ static WERROR regf_set_value(struct hive_key *key, const char *name,
        return regf_save_hbin(private_data->hive, 0);
 }
 
-static WERROR regf_save_hbin(struct regf_data *regf, int flush)
+static WERROR regf_save_hbin(struct regf_data *regf, bool flush)
 {
        struct tdr_push *push = tdr_push_init(regf);
        unsigned int i;
index 29417f86d36c170c5bf55ce8c22c5d7a775e446e..d1e953951fccd3914cb2c4147da9100db5f70eb7 100644 (file)
@@ -78,6 +78,11 @@ _PUBLIC_ char *reg_val_description(TALLOC_CTX *mem_ctx,
                               reg_val_data_string(mem_ctx, data_type, data));
 }
 
+/*
+ * This implements reading hex bytes that include comma's.
+ * It was previously handled by strhex_to_data_blob, but that did not cover 
+ * the format used by windows.
+ */
 static DATA_BLOB reg_strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *str)
 {
        DATA_BLOB ret;