diff options
author | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-02-28 22:39:03 +0000 |
---|---|---|
committer | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-02-28 22:39:03 +0000 |
commit | 45f8c4cdac1e468616c417c840452bec74bfa3ff (patch) | |
tree | ba3a64d05a9ab8a792aa004adac40c4769f27d8f /epan/dissectors/packet-http.c | |
parent | 1d3ae8d441aace567be04b2d262f74dd023a0381 (diff) |
even if unharmful, this was simply ugly.
change
do {
if (i == 0) break;
...
} while (i);
for a propper
while(i) {
...
}
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13557 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r-- | epan/dissectors/packet-http.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 9a8fb9f437..4c257ee826 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -329,9 +329,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, /* We'll then delete from the array all the stat_infos that do not belong to this frame */ i = stat_infos->len; - do { - if (i==0) break; - + while (i) { --i; si = g_ptr_array_index(stat_infos,i); @@ -343,7 +341,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, if (si->http_host) g_free(si->http_host); g_free(si); } - } while (i); + } /* then we'll add the current stat_info to the array */ g_ptr_array_add(stat_infos,stat_info); |