summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-ansi_a.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
committerEvan Huus <eapache@gmail.com>2013-03-29 00:26:23 +0000
commit37600a157ba2036a79a5ebf466b31b8eee19244e (patch)
tree05b5db07655ce39ffe0c9c42c62d30a0c389b8df /epan/dissectors/packet-ansi_a.c
parent6f19d87f4e3aaa5872bdec1d9f4e50d85eee193d (diff)
downloadwireshark-37600a157ba2036a79a5ebf466b31b8eee19244e.tar.gz
Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably it got most comments as well (except where there were typos). Use a consistent coding style, and make proper use of the WS_DLL_* defines. Group the functions appropriately in the header. I ended up getting rid of most of the explanatory comments since many of them duplicated what was in the value_string.c file (and were out of sync with the recent updates I made to those in r48633). Presumably most of the comments should be in the .h file not the .c file, but there's enough churn ahead that it's not worth fixing yet. Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467 svn path=/trunk/; revision=48634
Diffstat (limited to 'epan/dissectors/packet-ansi_a.c')
-rw-r--r--epan/dissectors/packet-ansi_a.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index 65cfc3befe..98746aa844 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -63,7 +63,7 @@ void proto_register_ansi_a(void);
void proto_reg_handoff_ansi_a(void);
static const gchar *
-my_match_strval_idx(guint32 val, const ext_value_string_t *vs, gint *idx, gint *dec_idx)
+my_try_val_to_str_idx(guint32 val, const ext_value_string_t *vs, gint *idx, gint *dec_idx)
{
gint i = 0;
@@ -3381,7 +3381,7 @@ elem_info_rec_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint
rec_type = tvb_get_guint8(tvb, curr_offset);
- str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
+ str = try_val_to_str_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
if (str == NULL)
{
@@ -5318,7 +5318,7 @@ elem_adds_user_part(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gui
adds_app = oct & 0x3f;
- str = match_strval_idx((guint32) adds_app, ansi_a_adds_strings, &idx);
+ str = try_val_to_str_idx((guint32) adds_app, ansi_a_adds_strings, &idx);
if (str == NULL)
{
str = "Reserved";
@@ -6273,7 +6273,7 @@ elem_fwd_ms_info_recs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g
rec_type = tvb_get_guint8(tvb, curr_offset);
- str = match_strval_idx((guint32) rec_type, ansi_fwd_ms_info_rec_str, &idx);
+ str = try_val_to_str_idx((guint32) rec_type, ansi_fwd_ms_info_rec_str, &idx);
if (str == NULL)
{
@@ -6564,7 +6564,7 @@ elem_rev_ms_info_recs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g
rec_type = tvb_get_guint8(tvb, curr_offset);
- str = match_strval_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
+ str = try_val_to_str_idx((guint32) rec_type, ansi_rev_ms_info_rec_str, &idx);
if (str == NULL)
{
@@ -11669,7 +11669,7 @@ dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
oct = tvb_get_guint8(tvb, offset++);
- msg_str = my_match_strval_idx((guint32) oct, ansi_a_bsmap_strings, &idx, &dec_idx);
+ msg_str = my_try_val_to_str_idx((guint32) oct, ansi_a_bsmap_strings, &idx, &dec_idx);
/*
* create the a protocol tree
@@ -11786,7 +11786,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
oct = tvb_get_guint8(tvb, offset++);
- msg_str = my_match_strval_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
+ msg_str = my_try_val_to_str_idx((guint32) oct, ansi_a_dtap_strings, &idx, &dec_idx);
/*
* create the a protocol tree