diff options
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/util.c | 12 |
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; |