Change most while loops over TR_LISTs to for loops
authorJennifer Richards <jennifer@painless-security.com>
Wed, 25 Apr 2018 16:04:37 +0000 (12:04 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Wed, 25 Apr 2018 16:04:37 +0000 (12:04 -0400)
commitaa5b6ae3d5d45cadb63b00937f7b6c995933538a
tree786b7a74e176e1531a4c5686201cc8af0ad158a2
parent77c4587fc69a4b875a31f821c99ca887155d47d3
Change most while loops over TR_LISTs to for loops

The while loop patter (i = first(); while(i){blah; i = next()}) pattern
was error-prone -- too easy to overlook or forget the next() call.
Changed most of these to for loops to make the iteration more apparent.
Added a few comments. No intentional functional changes.
common/tr_comm_encoders.c
common/tr_filter.c
common/tr_filter_encoders.c
common/tr_gss_names.c
common/tr_idp_encoders.c
common/tr_rp_client_encoders.c
trp/trp_ptable_encoders.c