diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-06-16 07:17:00 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-06-16 07:17:00 +0000 |
commit | 1b4f1334b3dffa2a3876881e6c013332c1daf12f (patch) | |
tree | 4c91da844000219a8a515917804bdda12daf1212 /epan/dissectors/packet-componentstatus.c | |
parent | bf7e55a6e4b631ceea1fd9ee5645bda9a2557c02 (diff) |
"proto_tree_add_text()" supports printf-style formats; there's no need
to format into a buffer and then pass that buffer.
Make a count an "int" rather than a "size_t" to squelch a (valid)
compiler warning.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18482 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-componentstatus.c')
-rw-r--r-- | epan/dissectors/packet-componentstatus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-componentstatus.c b/epan/dissectors/packet-componentstatus.c index 7a6f8c050f..460fdab7f9 100644 --- a/epan/dissectors/packet-componentstatus.c +++ b/epan/dissectors/packet-componentstatus.c @@ -158,10 +158,9 @@ dissect_componentstatusprotocol_componentstatusreport_message(tvbuff_t *message_ proto_item *association_item; proto_tree *association_tree; gint associations; - size_t i; + int i; gint offset; gint remaining_length; - char title[64]; proto_tree_add_item(message_tree, hf_componentstatusreport_reportinterval, message_tvb, COMPONENTSTATUSREPORT_REPORTINTERVAL_OFFSET, COMPONENTSTATUSREPORT_REPORTINTERVAL_LENGTH, FALSE); proto_tree_add_item(message_tree, hf_componentstatusreport_location, message_tvb, COMPONENTSTATUSREPORT_LOCATION_OFFSET, COMPONENTSTATUSREPORT_LOCATION_LENGTH, FALSE); @@ -173,8 +172,8 @@ dissect_componentstatusprotocol_componentstatusreport_message(tvbuff_t *message_ offset = COMPONENTSTATUSREPORT_ASSOCIATIONARRAY_OFFSET; i = 1; while((remaining_length = tvb_length_remaining(message_tvb, offset)) >= COMPONENTASSOCIATION_LENGTH) { - snprintf((char*)&title, sizeof(title), "Association #%d", i++); - association_item = proto_tree_add_text(message_tree, message_tvb, offset, COMPONENTASSOCIATION_LENGTH, title); + association_item = proto_tree_add_text(message_tree, message_tvb, offset, COMPONENTASSOCIATION_LENGTH, + "Association #%d", i++); association_tree = proto_item_add_subtree(association_item, ett_association); association_tvb = tvb_new_subset(message_tvb, offset, COMPONENTASSOCIATION_LENGTH, COMPONENTASSOCIATION_LENGTH); |