summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-07-01 00:09:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:44 -0500
commitb3b83941d8d5947944ba0c6423fabdc4532e0f5f (patch)
tree51f0f9d0efeb2bd13dc2a60537098ac09d8b9c45
parent7a3f98e5080ee2fadfe236e2ab6d34ddb05981fa (diff)
downloadsamba-b3b83941d8d5947944ba0c6423fabdc4532e0f5f.tar.gz
samba-b3b83941d8d5947944ba0c6423fabdc4532e0f5f.tar.bz2
samba-b3b83941d8d5947944ba0c6423fabdc4532e0f5f.zip
r23669: Move a variable into the only block where it is used.
(This used to be commit 82be4137b7bba6a9a433ec011e7f47587935ae61)
-rw-r--r--source3/lib/util_reg_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 423fdfd3be..8668bd8817 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -51,7 +51,6 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
*/
smb_ucs2_t *tmp;
- uint32 num_ucs2 = length / 2;
if (length == 1) {
/* win2k regedit gives us a string of 1 byte when
@@ -71,6 +70,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
goto error;
}
else {
+ uint32 num_ucs2 = length / 2;
if (!(tmp = SMB_MALLOC_ARRAY(smb_ucs2_t, num_ucs2+1))) {
err = WERR_NOMEM;
goto error;