Commit fed60a78 authored by Matt Caswell's avatar Matt Caswell
Browse files

Use for loop in WPACKET_fill_lengths instead of do...while



Based on review feedback

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)
parent 34f7245b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -232,12 +232,10 @@ int WPACKET_fill_lengths(WPACKET *pkt)
    if (pkt->subs == NULL)
        return 0;

    sub = pkt->subs;
    do {
    for (sub = pkt->subs; sub != NULL; sub = sub->parent) {
        if (!wpacket_intern_close(pkt, sub, 0))
            return 0;
        sub = sub->parent;
    } while (sub != NULL);
    }

    return 1;
}