summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-15 11:12:52 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-15 13:27:40 +0100
commit4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf (patch)
tree49b04cd2077dc9ed09709513a46deb2f3f75556a /source4
parent1e5010d35313d851a3904b116d3a4c2d3f0e199f (diff)
downloadsamba-4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf.tar.gz
samba-4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf.tar.bz2
samba-4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/util.c12
1 files changed, 6 insertions, 6 deletions
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;