From 4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 15 Mar 2010 11:12:52 +0100 Subject: s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch (As in the "reg_value_types" structure) --- source4/lib/registry/util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 5b4c41f752..ba284de8db 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -69,6 +69,9 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, return talloc_strdup(mem_ctx, ""); switch (type) { + case REG_NONE: + /* "NULL" is the right return value */ + break; case REG_EXPAND_SZ: case REG_SZ: if (data.length % 2 == 0) { @@ -96,9 +99,6 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, BVAL(data.data, 0)); } break; - case REG_NONE: - /* "NULL" is the right return value */ - break; case REG_MULTI_SZ: /* FIXME: We don't support this yet */ break; @@ -146,6 +146,9 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, /* Convert data appropriately */ switch (*type) { + case REG_NONE: + ZERO_STRUCTP(data); + break; case REG_SZ: case REG_EXPAND_SZ: convert_string_talloc_convenience(mem_ctx, @@ -171,9 +174,6 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, SBVAL(data->data, 0, tmp); } break; - case REG_NONE: - ZERO_STRUCTP(data); - break; case REG_MULTI_SZ: /* FIXME: We don't support this yet */ return false; -- cgit