diff options
author | Matt Caswell <matt@openssl.org> | 2017-01-27 12:05:52 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-01-30 10:18:24 +0000 |
commit | fed60a781c3da1e91aa90df68f062bf577a2b24a (patch) | |
tree | dde6c1dbae995bc077369029659d6278fe54c830 /ssl/packet.c | |
parent | 34f7245ba0a5381867e1ea0b7520106218e5bbb1 (diff) |
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)
Diffstat (limited to 'ssl/packet.c')
-rw-r--r-- | ssl/packet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ssl/packet.c b/ssl/packet.c index 87473fbbce..3479f1fed8 100644 --- a/ssl/packet.c +++ b/ssl/packet.c @@ -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; } |