Bug 1202868, Another Windows bustage fix, variable declarations must go first
authorKai Engert <kaie@kuix.de>
Thu, 15 Oct 2015 20:45:46 +0200
changeset 11658 b4feb2cb0ed60b13802cb7d2c489bb355258bd0a
parent 11657 534aca7a5bcaabe39804d5eec8b94b711298cc29
child 11659 25cb033147fdec229dd1c7febeef3f10f0af682f
push id811
push userkaie@kuix.de
push dateThu, 15 Oct 2015 18:47:50 +0000
bugs1202868
Bug 1202868, Another Windows bustage fix, variable declarations must go first
lib/util/secasn1d.c
--- a/lib/util/secasn1d.c
+++ b/lib/util/secasn1d.c
@@ -1785,16 +1785,17 @@ sec_asn1d_next_substring (sec_asn1d_stat
 	    return;
 	}
 
 	state->pending -= child_consumed;
 	if (state->pending == 0)
 	    done = PR_TRUE;
     } else {
 	PRBool preallocatedString;
+	sec_asn1d_state *temp_state;
 	PORT_Assert (state->indefinite);
 
 	item = (SECItem *)(child->dest);
 
 	/**
 	 * At this point, there's three states at play:
 	 *   child: The element that was just parsed
 	 *   state: The currently processed element
@@ -1858,17 +1859,17 @@ sec_asn1d_next_substring (sec_asn1d_stat
 	 * constructed encoding, so continue walking the ancestor chain until a
 	 * clear determination can be made.
 	 *
 	 * The variable preallocatedString is used to indicate Case #1/#3,
 	 * indicating an in-place copy has already occurred, and Cases #2, #4,
 	 * and #5 all have the same behaviour of adding a new substring.
 	 */
 	preallocatedString = PR_FALSE;
-	sec_asn1d_state *temp_state = state;
+	temp_state = state;
 	while (temp_state && item == temp_state->dest && temp_state->indefinite) {
 	    sec_asn1d_state *parent = sec_asn1d_get_enclosing_construct(temp_state);
 	    if (!parent || parent->underlying_kind != temp_state->underlying_kind) {
 	        /* Case #5 - Either this is a top-level construct or it is part
 	         * of some other element (e.g. a SEQUENCE), in which case, a
 	         * new item should be allocated. */
 	        break;
 	    }