summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-29 14:55:20 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-29 14:58:41 +0100
commit51bedf939568717424edd7732e1e315faa333849 (patch)
treec8e90c658214a6f33f2ec0ed629da02a27c1790d /source4/lib
parentdf1d42fc1b5fd27a8969819212f51a74b310d909 (diff)
downloadsamba-51bedf939568717424edd7732e1e315faa333849.tar.gz
samba-51bedf939568717424edd7732e1e315faa333849.tar.bz2
samba-51bedf939568717424edd7732e1e315faa333849.zip
lib/registry/util.c - Reorder the registry datatypes of the conversion functions
This is absolutely cosmetic and makes the code easier to comprehend.
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/util.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 9409a8f4bc..f9ea2a1934 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -82,10 +82,14 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx,
*(int *)data.data);
}
break;
+ case REG_NONE:
+ /* "NULL" is the right return value */
+ break;
case REG_MULTI_SZ:
- /* FIXME */
+ /* FIXME: We don't support this yet */
break;
default:
+ /* Other datatypes aren't supported -> return "NULL" */
break;
}
@@ -137,23 +141,22 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
(void **)&data->data,
&data->length, false);
break;
-
+ case REG_BINARY:
+ *data = strhex_to_data_blob(mem_ctx, data_str);
+ break;
case REG_DWORD: {
uint32_t tmp = strtol(data_str, NULL, 0);
*data = data_blob_talloc(mem_ctx, &tmp, 4);
}
break;
-
case REG_NONE:
ZERO_STRUCTP(data);
break;
-
- case REG_BINARY:
- *data = strhex_to_data_blob(mem_ctx, data_str);
- break;
-
+ case REG_MULTI_SZ:
+ /* FIXME: We don't support this yet */
+ return false;
default:
- /* FIXME */
+ /* Other datatypes aren't supported -> return no success */
return false;
}
return true;