From b3b83941d8d5947944ba0c6423fabdc4532e0f5f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 1 Jul 2007 00:09:20 +0000 Subject: r23669: Move a variable into the only block where it is used. (This used to be commit 82be4137b7bba6a9a433ec011e7f47587935ae61) --- source3/lib/util_reg_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') 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; -- cgit