Bug 1202868, Windows bustage fix, variable declarations must go first.
--- a/lib/util/secasn1d.c
+++ b/lib/util/secasn1d.c
@@ -1784,16 +1784,17 @@ sec_asn1d_next_substring (sec_asn1d_stat
state->top->status = decodeError;
return;
}
state->pending -= child_consumed;
if (state->pending == 0)
done = PR_TRUE;
} else {
+ PRBool preallocatedString;
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
@@ -1856,17 +1857,17 @@ sec_asn1d_next_substring (sec_asn1d_stat
* between 'state' and 'parent' may go through several levels of
* 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.
*/
- PRBool preallocatedString = PR_FALSE;
+ preallocatedString = PR_FALSE;
sec_asn1d_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;