diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-28 21:55:11 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-03-28 21:55:11 +0000 |
commit | 915762792536e1904394f58ca4962760d84970ee (patch) | |
tree | dc1df6288600e883ed53ac7e43a38a2d03abb9f3 /epan/dissectors/packet-bittorrent.c | |
parent | 9eb2c4641e6b7e5fc6757979bd9fcc022089f58a (diff) |
Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21253 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-bittorrent.c')
-rw-r--r-- | epan/dissectors/packet-bittorrent.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index f4d67158e9..43da881a68 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -199,7 +199,7 @@ static guint get_bittorrent_pdu_length(packet_info *pinfo _U_, tvbuff_t *tvb, in guint32 length; if (tvb_get_guint8(tvb, offset) == 19 && - tvb_memeql(tvb, offset + 1, (guint8*)"BitTorrent protocol", 19) == 0) { + tvb_memeql(tvb, offset + 1, "BitTorrent protocol", 19) == 0) { /* Return the length of a Handshake message */ return 1 + /* pstrlen */ 19 + /* pstr */ @@ -540,7 +540,7 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto for ( i=0 ; amp_messages[i].name ; i++ ) { if (strlen(amp_messages[i].name)==typelen && tvb_memeql(tvb, offset + BITTORRENT_HEADER_LENGTH + 4, - (guint8*)amp_messages[i].name, strlen(amp_messages[i].name))==0) { + amp_messages[i].name, strlen(amp_messages[i].name))==0) { prio = tvb_get_guint8(tvb, offset + BITTORRENT_HEADER_LENGTH + 4 + typelen); if (prio==0 || prio==1 || prio==2) { @@ -706,11 +706,11 @@ static void dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, p if(decode_client_information) { for(i = 0; peer_id[i].id[0] != '\0'; ++i) { - if(tvb_memeql(tvb, offset, (guint8*)peer_id[i].id, strlen(peer_id[i].id)) == 0) { + if(tvb_memeql(tvb, offset, peer_id[i].id, strlen(peer_id[i].id)) == 0) { /* The version number is 4 numeric characters for the client ids beginning with '-' and 3 characters for the rest. */ - version = (char*)tvb_get_string(tvb, offset + strlen(peer_id[i].id), + version = tvb_get_string(tvb, offset + strlen(peer_id[i].id), (peer_id[i].id[0] == '-') ? 4 : 3); proto_tree_add_text(tree, tvb, offset, 20, "Client is %s v%s", peer_id[i].name, @@ -739,7 +739,7 @@ static void dissect_bittorrent_tcp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto tree = proto_item_add_subtree(ti, ett_bittorrent); if (tvb_get_guint8(tvb, 0) == 19 && - tvb_memeql(tvb, 1, (guint8*)"BitTorrent protocol", 19) == 0) { + tvb_memeql(tvb, 1, "BitTorrent protocol", 19) == 0) { dissect_bittorrent_welcome(tvb, pinfo, tree); } else { dissect_bittorrent_message(tvb, pinfo, tree); @@ -764,7 +764,7 @@ static gboolean test_bittorrent_packet (tvbuff_t *tvb, packet_info *pinfo, if (tvb_bytes_exist(tvb, 0, 20) && tvb_get_guint8(tvb, 0) == 19 && - tvb_memeql(tvb, 1, (guint8*)"BitTorrent protocol", 19) == 0) { + tvb_memeql(tvb, 1, "BitTorrent protocol", 19) == 0) { conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); conversation_set_dissector(conversation, dissector_handle); |