aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_gm.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-16 03:35:29 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-16 03:35:29 +0000
commit357e335a9d3ca043c9bf08701399cf650fa666a0 (patch)
tree9659b266111b939e5e8ec48e927fd36978e40e88 /epan/dissectors/packet-gsm_a_gm.c
parent79d6570a1e16ef93f8050d800e46811876b81a4a (diff)
Use tvb_memeql() and tvb_memcpy().
Use tvb_ip_to_str() and tvb_ip6_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the return string is NULL terminated. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35546 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gsm_a_gm.c')
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index fe1974226c..d7c34325e2 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -3049,16 +3049,13 @@ de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
{
guint32 curr_offset;
guint curr_len;
- const guint8 *cptr;
guint8 str[MAX_APN_LENGTH+1];
- cptr = tvb_get_ptr(tvb, offset, len);
-
curr_offset = offset;
/* init buffer and copy it */
memset ( str , 0 , MAX_APN_LENGTH );
- memcpy ( str , cptr , len<MAX_APN_LENGTH?len:MAX_APN_LENGTH );
+ tvb_memcpy(tvb, str, offset, len<MAX_APN_LENGTH?len:MAX_APN_LENGTH);
curr_len = 0;
while (( curr_len < len ) && ( curr_len < MAX_APN_LENGTH ))
@@ -5593,7 +5590,7 @@ dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
/*
* [8] 9.5.13 Modify PDP Context Reject
- * Direction: both
+ * Direction: both
*/
static void
dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)