From: Volker Lendecke Date: Fri, 3 Aug 2018 10:43:37 +0000 (+0200) Subject: mdssvc: Move a variable declaration closer to its use X-Git-Tag: tdb-1.3.17~1617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71c70607982981338252e529c39c13b94b9eb497;p=thirdparty%2Fsamba.git mdssvc: Move a variable declaration closer to its use Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/rpc_server/mdssvc/marshalling.c b/source3/rpc_server/mdssvc/marshalling.c index 76db6ffa39e..562afa6c974 100644 --- a/source3/rpc_server/mdssvc/marshalling.c +++ b/source3/rpc_server/mdssvc/marshalling.c @@ -1058,7 +1058,7 @@ static ssize_t sl_unpack_loop(DALLOC_CTX *query, int i, toc_index, subcount; uint64_t result; sl_nil_t nil; - struct sl_tag tag, cpx_tag; + struct sl_tag tag; while (count > 0) { if (offset >= toc_offset) { @@ -1071,7 +1071,9 @@ static ssize_t sl_unpack_loop(DALLOC_CTX *query, } switch (tag.type) { - case SQ_TYPE_COMPLEX: + case SQ_TYPE_COMPLEX: { + struct sl_tag cpx_tag; + if (tag.count < 1) { DEBUG(1,("%s: invalid tag.count: %d\n", __func__, tag.count)); @@ -1101,6 +1103,7 @@ static ssize_t sl_unpack_loop(DALLOC_CTX *query, */ count--; break; + } case SQ_TYPE_NULL: subcount = tag.count;