aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enip.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-10-11 23:38:57 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-10-11 23:38:57 +0000
commit4dd264cc659cc220e84d3dbfbf799aa542c4669f (patch)
tree7b1c573401eef9110eccafdb40e6f211c8c39a35 /epan/dissectors/packet-enip.c
parent118236baccd92b0e7c6bb2bb6c748e989a357d54 (diff)
remove some redundant strcpy()
fix a compiler warning svn path=/trunk/; revision=16195
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r--epan/dissectors/packet-enip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 9c7a89c0ac..a06e92329b 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -225,7 +225,7 @@ add_byte_array_text_to_proto_tree( proto_tree *tree, tvbuff_t *tvb, gint start,
tmp2_length = ( length * 2 ) + 1;
}
- tmp = tvb_get_ptr( tvb, start, tmp_length );
+ tmp = (char *)tvb_get_ptr( tvb, start, tmp_length );
tmp2 = (char*)g_malloc( tmp2_length );
tmp2start = tmp2;
@@ -550,7 +550,7 @@ dissect_enip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int packet_type;
guint16 encap_cmd, encap_data_length;
- char pkt_type_str[9] = "";
+ char *pkt_type_str = "";
guint32 ifacehndl;
/* Set up structures needed to add the protocol subtree and manage it */
@@ -572,15 +572,15 @@ dissect_enip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch ( packet_type )
{
case REQUEST_PACKET:
- strcpy(pkt_type_str, "Req");
+ pkt_type_str="Req";
break;
case RESPONSE_PACKET:
- strcpy(pkt_type_str, "Rsp");
+ pkt_type_str="Rsp";
break;
default:
- strcpy(pkt_type_str, "?");
+ pkt_type_str="?";
}
/* Add service and request/response to info column */