From 1d0038e8c0b97f22ca359184defde2cc98a6fa48 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 26 Jun 2005 19:56:52 +0000 Subject: Get rid of the private "my_match_strval()" routine in many dissectors; add a "match_strval_idx()" routine that does the same thing, and have "match_strval()" call it. Make those routines, and "val_to_str()", return a "const" pointer. Update dissectors as necessary to squelch compiler warnings produced by that. Use "val_to_str()" rather than using "match_strval()" and then, if the result is null, substituting a specific string. Clean up some other "match_strval()"/"val_to_str()" usages. Add a null pointer check in the NDPS dissector's "attribute_value()" routine, as it's not clear that "global_attribute_name" won't be null at that point. Make some global variables in the AFS4INT dissector local. Make some routines not used outside the module they're in static. Make some tables "static const". Clean up white space. Fix Gerald's address in some files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14786 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-bittorrent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-bittorrent.c') diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index a544a354e8..9aa9472c5e 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -123,8 +123,8 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto type = tvb_get_guint8(tvb, offset); proto_tree_add_item(mtree, hf_bittorrent_msg_type, tvb, offset, 1, FALSE); offset+=1; - if (check_col(pinfo->cinfo, COL_INFO)) { - char *val = match_strval(type, bittorrent_messages); + if (check_col(pinfo->cinfo, COL_INFO)) { + const char *val = match_strval(type, bittorrent_messages); if (val != NULL) { col_set_str(pinfo->cinfo, COL_INFO, val); } -- cgit v1.2.3