Use for loop in WPACKET_fill_lengths instead of do...while
Based on review feedback Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2259)
This commit is contained in:
parent
34f7245ba0
commit
fed60a781c
1 changed files with 2 additions and 4 deletions
|
@ -232,12 +232,10 @@ int WPACKET_fill_lengths(WPACKET *pkt)
|
||||||
if (pkt->subs == NULL)
|
if (pkt->subs == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
sub = pkt->subs;
|
for (sub = pkt->subs; sub != NULL; sub = sub->parent) {
|
||||||
do {
|
|
||||||
if (!wpacket_intern_close(pkt, sub, 0))
|
if (!wpacket_intern_close(pkt, sub, 0))
|
||||||
return 0;
|
return 0;
|
||||||
sub = sub->parent;
|
}
|
||||||
} while (sub != NULL);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue