aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enip.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-10-11 23:38:57 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2005-10-11 23:38:57 +0000
commitaf5edf1b15126edea2cd6e5c3378dc46ec304d58 (patch)
tree7b1c573401eef9110eccafdb40e6f211c8c39a35 /epan/dissectors/packet-enip.c
parent74690be4fed87856e62e6d48363baeb423ba2038 (diff)
remove some redundant strcpy()
fix a compiler warning git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16195 f5534014-38df-0310-8fa8-9805f1628bb7
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 */