diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-28 21:55:11 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-28 21:55:11 +0000 |
commit | 8fd3ee05600dd7d0e6434e7eb824932c52000ce3 (patch) | |
tree | dc1df6288600e883ed53ac7e43a38a2d03abb9f3 /plugins | |
parent | 32780e71e8ce8c8fd1898cbcb62f6bc8a59341f3 (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.
svn path=/trunk/; revision=21253
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/agentx/packet-agentx.c | 2 | ||||
-rw-r--r-- | plugins/asn1/packet-asn1.c | 68 | ||||
-rw-r--r-- | plugins/irda/packet-irda.c | 14 | ||||
-rw-r--r-- | plugins/mgcp/packet-mgcp.c | 8 | ||||
-rw-r--r-- | plugins/opsi/packet-opsi.c | 2 | ||||
-rw-r--r-- | plugins/sbus/packet-sbus.c | 4 | ||||
-rw-r--r-- | plugins/stats_tree/pinfo_stats_tree.c | 24 |
7 files changed, 61 insertions, 61 deletions
diff --git a/plugins/agentx/packet-agentx.c b/plugins/agentx/packet-agentx.c index 0c1a79dc36..f7b6b2c49c 100644 --- a/plugins/agentx/packet-agentx.c +++ b/plugins/agentx/packet-agentx.c @@ -306,7 +306,7 @@ static int dissect_octet_string(tvbuff_t *tvb, proto_tree *tree, int offset, cha p_noct = PADDING(n_oct); if (n_oct >= 1024) THROW(ReportedBoundsError); - tvb_get_nstringz(tvb, offset + 4, n_oct, (guint8*)context); + tvb_get_nstringz(tvb, offset + 4, n_oct, context); context[n_oct]='\0'; proto_tree_add_uint(tree,hf_ostring_len,tvb,offset,4,n_oct); diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c index 6748292c4e..213ce4361e 100644 --- a/plugins/asn1/packet-asn1.c +++ b/plugins/asn1/packet-asn1.c @@ -580,12 +580,12 @@ showoctets(guchar *octets, guint len, guint hexlen) /* if len <= hexlen, always p += sprintf(p, "%2.2X", octets[i]); } *p++ = ' '; /* insert space */ - strncpy(p, (gchar *)octets, len); + strncpy(p, octets, len); p[len] = 0; } else { /* g_strdup_printf("%*s%s", len, octets, endstr) does not work ?? */ str = g_malloc(len+5); - strncpy(str, (gchar *)octets, len); + strncpy(str, octets, len); strcpy(&str[len], endstr); } } @@ -757,7 +757,7 @@ dissect_asn1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, (gint *)&offset); + asn1_close(&asn1, &offset); PDUreset(pcount, 0); /* arguments are just for debugging */ getPDUprops(&props, boffset, cls, tag, con); @@ -822,7 +822,7 @@ dissect_asn1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* open BER decoding */ asn1_open(&asn1, tvb, offset); asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, (gint *)&offset); + asn1_close(&asn1, &offset); PDUreset(pcount, i+1); getPDUprops(&props, boffset, cls, tag, con); @@ -964,7 +964,7 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in boffset = offset; asn1_open(&asn1, tvb, offset); ret = asn1_header_decode(&asn1, &cls, &con, &tag, &def, &len); - asn1_close(&asn1, (gint *)&offset); /* mark current position */ + asn1_close(&asn1, &offset); /* mark current position */ if (ret != ASN1_ERR_NOERROR) { proto_tree_add_text(pt, tvb, offset, 1, "ASN1 ERROR: %s", asn1_err_to_str(ret) ); break; @@ -1021,8 +1021,8 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in case BER_CLASS_UNI: /* fprintf(stderr, "Universal\n"); */ switch(tag) { case BER_UNI_TAG_INTEGER: - ret = asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ + ret = asn1_int32_value_decode(&asn1, len, &value); /* read value */ + asn1_close(&asn1, &offset); /* mark where we are now */ if (asn1_debug) { if ( (props.value_id == -1) || (tbl_types_wireshark[props.type] != FT_UINT32) ) @@ -1059,8 +1059,8 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in break; case BER_UNI_TAG_ENUMERATED: - ret = asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ + ret = asn1_int32_value_decode(&asn1, len, &value); /* read value */ + asn1_close(&asn1, &offset); /* mark where we are now */ ename = getPDUenum(&props, boffset, cls, tag, value); if (asn1_debug) { if ( (props.value_id == -1) || @@ -1159,12 +1159,12 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in tname, name, ename, empty); else { proto_tree_add_string_format(pt, props.value_id, tvb, boffset, - offset - boffset, (gchar *)octets, /* \0 termnated */ + offset - boffset, octets, /* \0 termnated */ textfmt_s, boffset, clsstr, constr, tagstr, tname, name, ename, matchind); if (props.type_id != -1) proto_tree_add_string_hidden(pt, props.type_id, tvb, - boffset, offset - boffset, (gchar *)octets); + boffset, offset - boffset, octets); } } else { if ( (props.value_id == -1) || @@ -1175,11 +1175,11 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in "(%s)%s: %s", tname, name, ename); else { proto_tree_add_string_format(pt, props.value_id, tvb, boffset, - offset - boffset, (gchar *)octets, /* \0 terminated */ + offset - boffset, octets, /* \0 terminated */ "(%s)%s: %s ~", tname, name, ename); if (props.type_id != -1) proto_tree_add_string_hidden(pt, props.type_id, tvb, - boffset, offset - boffset, (gchar *)octets); + boffset, offset - boffset, octets); } } g_free(octets); @@ -1188,7 +1188,7 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in case BER_UNI_TAG_BITSTRING: ret = asn1_bits_decode(&asn1, len, &bits, &con, &unused); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ + asn1_close(&asn1, &offset); /* mark where we are now */ ename = showbitnames(bits, (con*8)-unused, &props, offset); if (asn1_debug) { if ( (props.value_id == -1) || @@ -1312,11 +1312,11 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in ename, empty); else { proto_tree_add_bytes_format(pt, props.value_id, tvb, boffset, - offset - boffset, (guint8 *)ename,/* XXX length?*/ + offset - boffset, ename,/* XXX length?*/ "(%s)%s: %s ~", tname, name, ename); if (props.type_id != -1) proto_tree_add_bytes_hidden(pt, props.type_id, tvb, - boffset, offset - boffset, (guint8 *)ename); + boffset, offset - boffset, ename); } } else { if ( (props.value_id == -1) || @@ -1327,11 +1327,11 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in "(%s)%s: %s", tname, name, ename); else { proto_tree_add_bytes_format(pt, props.value_id, tvb, boffset, - offset - boffset, (guint8 *)ename, /* XXX length ? */ + offset - boffset, ename, /* XXX length ? */ "(%s)%s: %s ~", tname, name, ename); if (props.type_id != -1) proto_tree_add_bytes_hidden(pt, props.type_id, tvb, - boffset, offset - boffset, (guint8 *)ename); + boffset, offset - boffset, ename); } } g_free(oid); @@ -1384,7 +1384,7 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in if (len > 4) goto dostring; ret = asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ + asn1_close(&asn1, &offset); /* mark where we are now */ if (asn1_debug) { if ( (props.value_id == -1) || (tbl_types_wireshark[props.type] != FT_UINT32) ) @@ -1423,8 +1423,8 @@ decode_asn1_sequence(tvbuff_t *tvb, guint offset, guint tlen, proto_tree *pt, in case TBL_ENUMERATED: if (len > 4) goto dostring; - ret = asn1_int32_value_decode(&asn1, len, (gint32 *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are now */ + ret = asn1_int32_value_decode(&asn1, len, &value); /* read value */ + asn1_close(&asn1, &offset); /* mark where we are now */ ename = getPDUenum(&props, boffset, cls, tag, value); if (asn1_debug) { if ( (props.value_id == -1) || @@ -1759,7 +1759,7 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr) case BER_UNI_TAG_BOOLEAN: ret = asn1_bool_decode(&asn1, len, (gboolean *)&value); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ + asn1_close(&asn1, &offset); /* mark where we are */ break; case BER_UNI_TAG_OCTETSTRING: @@ -1771,13 +1771,13 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr) case BER_UNI_TAG_UTCTime: case BER_UNI_TAG_GeneralizedTime: ret = asn1_string_value_decode(&asn1, len, &octets); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ + asn1_close(&asn1, &offset); /* mark where we are */ g_free(octets); break; case BER_UNI_TAG_BITSTRING: ret = asn1_bits_decode(&asn1, len, &bits, &con, &unused); - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ + asn1_close(&asn1, &offset); /* mark where we are */ g_free(bits); break; @@ -1794,7 +1794,7 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr) case BER_UNI_TAG_OID: ret = asn1_oid_value_decode(&asn1, len, &oid, &con); - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ + asn1_close(&asn1, &offset); /* mark where we are */ g_free(oid); break; @@ -1822,7 +1822,7 @@ parse_tt3(tvbuff_t *tvb, guint offset, guint size, guint level, GNode *ptr) if (def && !con) { /* defined length, not constructed, must be a string.... */ asn1_string_value_decode(&asn1, len, &octets); /* read value */ - asn1_close(&asn1, (gint *)&offset); /* mark where we are */ + asn1_close(&asn1, &offset); /* mark where we are */ g_free(octets); } else { /* indefinite length or constructed.... must be a sequence .... */ @@ -2386,7 +2386,7 @@ is_typedef(GNode *node, gpointer data) if (d == 0) return FALSE; if (d->type != TBLTYPE_TypeDef) return FALSE; - if (strcmp(s->key, (gchar *)d->typeName) == 0) { + if (strcmp(s->key, d->typeName) == 0) { s->here = node; return TRUE; } @@ -2433,7 +2433,7 @@ is_named(GNode *node, gpointer data) if (num->value > n->used) /* track max used value, there may be holes... */ n->used = num->value; - n->info[num->value].name = (gchar *)num->name; + n->info[num->value].name = num->name; return FALSE; } @@ -2460,7 +2460,7 @@ index_typedef(GNode *node, gpointer data) n->used = d->typeDefId; t = &(n->info[d->typeDefId]); - t->name = (gchar *)d->typeName; + t->name = d->typeName; t->type = node; t->refs = g_ptr_array_new(); /* collect references here */ node = g_node_first_child(node); /* the real type */ @@ -2635,7 +2635,7 @@ showGNode(GNode *p, int n) case TBLTYPE_Type: { TBLType *t = (TBLType *)p->data; if (t->fieldName) - s = (gchar *)t->fieldName; + s = t->fieldName; /* typeId is a value from enum TBLTypeId */ fn = TBLTYPE(t->typeId); if (asn1_verbose) g_message("%*stype %d[%s]%s [%s]", n, empty, t->typeId, fn, @@ -2962,7 +2962,7 @@ tbl_typeref(guint n, GNode *pdu, GNode *tree, guint fullindex) p = g_malloc0(sizeof(PDUinfo)); nvals++; p->type = TBL_ENUMERATED; - p->name = (gchar *) (((TBLNamedNumber *)q->data)->name); + p->name = (((TBLNamedNumber *)q->data)->name); p->tag = (((TBLNamedNumber *)q->data)->value); p->flags = PDU_NAMEDNUM; if (asn1_verbose) g_message("%*s %3d %s", n*2, empty, p->tag, p->name); @@ -3071,9 +3071,9 @@ tbl_type(guint n, GNode *pdu, GNode *list, guint fullindex) /* indent, pdu, sour if (((TBLType *)list->data)->fieldName == 0) { /* no name assigned */ /* assign an anonymous name [XXX refer to parent typename...] */ ((TBLType *)list->data)->fieldName = - (guint8 *)g_strdup_printf("anon%d", anonCount++); + g_strdup_printf("anon%d", anonCount++); } - p->name = (gchar *)((TBLType *)list->data)->fieldName; + p->name = ((TBLType *)list->data)->fieldName; ni = fullindex; ni += g_snprintf(&fieldname[ni], sizeof(fieldname) - ni, ".%s", p->name); @@ -4950,7 +4950,7 @@ proto_register_asn1(void) { prefs_register_enum_preference(asn1_module, "type_recursion", "Eliminate references to level", "Allow this recursion level for eliminated type references", - (gint *)&type_recursion_level, + &type_recursion_level, type_recursion_opts, FALSE); prefs_register_bool_preference(asn1_module, "debug", "ASN.1 debug mode", diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c index 5e71f883c4..92ee1f7e11 100644 --- a/plugins/irda/packet-irda.c +++ b/plugins/irda/packet-irda.c @@ -588,9 +588,9 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r iap_conv->iap_query_frame = pinfo->fd->num; iap_conv->pattr_dissector = NULL; - tvb_memcpy(tvb, (guint8*)class_name, offset + 1 + 1, clen); + tvb_memcpy(tvb, class_name, offset + 1 + 1, clen); class_name[clen] = 0; - tvb_memcpy(tvb, (guint8*)attr_name, offset + 1 + 1 + clen + 1, alen); + tvb_memcpy(tvb, attr_name, offset + 1 + 1 + clen + 1, alen); attr_name[alen] = 0; /* Find the attribute dissector */ @@ -614,9 +614,9 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r col_add_str(pinfo->cinfo, COL_INFO, "GetValueByClass: \""); - tvb_memcpy(tvb, (guint8*)buf, offset + 1 + 1, clen); + tvb_memcpy(tvb, buf, offset + 1 + 1, clen); memcpy(&buf[clen], "\" \"", 3); - tvb_memcpy(tvb, (guint8*)buf + clen + 3, offset + 1 + 1 + clen + 1, alen); + tvb_memcpy(tvb, buf + clen + 3, offset + 1 + 1 + clen + 1, alen); buf[clen + 3 + alen] = '\"'; buf[clen + 3 + alen + 1] = 0; col_append_str(pinfo->cinfo, COL_INFO, buf); @@ -762,7 +762,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro case IAS_STRING: strcpy(buf, ", \""); n = tvb_get_guint8(tvb, offset + 8); - tvb_memcpy(tvb, (guint8*)buf + 3, offset + 9, n); + tvb_memcpy(tvb, buf + 3, offset + 9, n); strcpy(buf + 3 + n, "\""); break; } @@ -1643,7 +1643,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro if (name_len > 22) name_len = 22; - tvb_memcpy(tvb, (guint8*)buf, offset, name_len); + tvb_memcpy(tvb, buf, offset, name_len); buf[name_len] = 0; col_append_str(pinfo->cinfo, COL_INFO, ", \""); col_append_str(pinfo->cinfo, COL_INFO, buf); @@ -1690,7 +1690,7 @@ static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root) length = tvb_length(tvb); if (length > sizeof(buf)-1) length = sizeof(buf)-1; - tvb_memcpy(tvb, (guint8*)buf, 0, length); + tvb_memcpy(tvb, buf, 0, length); buf[length] = 0; if (buf[length-1] == '\n') buf[length-1] = 0; diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c index 4858ea70f2..870e0d6e30 100644 --- a/plugins/mgcp/packet-mgcp.c +++ b/plugins/mgcp/packet-mgcp.c @@ -958,7 +958,7 @@ static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength, const g gchar word[5]; /* Read the string into 'word' and see if it looks like the start of a verb */ - if ((maxlength >= 4) && tvb_get_nstringz0(tvb, offset, sizeof(word), (guint8*)word)) + if ((maxlength >= 4) && tvb_get_nstringz0(tvb, offset, sizeof(word), word)) { if (((strncasecmp(word, "EPCF", 4) == 0) && (*verb_name = "EndpointConfiguration")) || ((strncasecmp(word, "CRCX", 4) == 0) && (*verb_name = "CreateConnection")) || @@ -1332,7 +1332,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf) /* set the observedEvents or signalReq used in Voip Calls analysis */ if (buf != NULL) { - *buf = (gchar*)tvb_get_ephemeral_string(tvb, tvb_current_offset, (len - tvb_current_offset + offset)); + *buf = tvb_get_ephemeral_string(tvb, tvb_current_offset, (len - tvb_current_offset + offset)); } } } @@ -1841,7 +1841,7 @@ dissect_mgcp_connectionparams(proto_tree *parent_tree, tvbuff_t *tvb, gint offse /* The P: line */ offset += param_type_len; /* skip the P: */ - tokenline = (gchar*)tvb_get_ephemeral_string(tvb, offset, param_val_len); + tokenline = tvb_get_ephemeral_string(tvb, offset, param_val_len); /* Split into type=value pairs separated by comma */ tokens = ep_strsplit(tokenline, ",", -1); @@ -1953,7 +1953,7 @@ dissect_mgcp_localconnectionoptions(proto_tree *parent_tree, tvbuff_t *tvb, gint /* The L: line */ offset += param_type_len; /* skip the L: */ - tokenline = (gchar*)tvb_get_ephemeral_string(tvb, offset, param_val_len); + tokenline = tvb_get_ephemeral_string(tvb, offset, param_val_len); /* Split into type=value pairs separated by comma */ tokens = ep_strsplit(tokenline, ",", -1); diff --git a/plugins/opsi/packet-opsi.c b/plugins/opsi/packet-opsi.c index 1ee5ec9336..e5cb0fdb8f 100644 --- a/plugins/opsi/packet-opsi.c +++ b/plugins/opsi/packet-opsi.c @@ -339,7 +339,7 @@ void decode_string_attribute(tvbuff_t *tvb, proto_tree *tree, int* hfValue, int } pbuffer=tvb_get_string(tvb, offset+4, length-4); - proto_tree_add_string(tree, *hfValue, tvb, offset+4, length-4, (char*)pbuffer); + proto_tree_add_string(tree, *hfValue, tvb, offset+4, length-4, pbuffer); g_free(pbuffer); } diff --git a/plugins/sbus/packet-sbus.c b/plugins/sbus/packet-sbus.c index 62cb38c90e..a761143c58 100644 --- a/plugins/sbus/packet-sbus.c +++ b/plugins/sbus/packet-sbus.c @@ -1098,13 +1098,13 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Response: Firmware version */ case SBUS_RD_PROGRAM_VERSION: /*PCD type*/ - tmp_string = (char*)tvb_get_string(tvb, offset, 5); + tmp_string = tvb_get_string(tvb, offset, 5); proto_tree_add_string(sbus_tree, hf_sbus_cpu_type, tvb, offset, 5, tmp_string); offset += 5; g_free(tmp_string); /*FW version*/ - tmp_string = (char*)tvb_get_string(tvb , offset, 3); + tmp_string = tvb_get_string(tvb , offset, 3); proto_tree_add_string(sbus_tree, hf_sbus_fw_version, tvb, offset, 3, tmp_string); offset += 4; diff --git a/plugins/stats_tree/pinfo_stats_tree.c b/plugins/stats_tree/pinfo_stats_tree.c index 023fd674c1..4706c77609 100644 --- a/plugins/stats_tree/pinfo_stats_tree.c +++ b/plugins/stats_tree/pinfo_stats_tree.c @@ -60,12 +60,12 @@ static void ip_hosts_stats_tree_init(stats_tree* st) { static int ip_hosts_stats_tree_packet(stats_tree *st , packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) { static guint8 str[128]; - tick_stat_node(st, (guint8*)st_str_ip, 0, FALSE); + tick_stat_node(st, st_str_ip, 0, FALSE); - g_snprintf((char*)str, sizeof(str),"%s",address_to_str(&pinfo->net_src)); + g_snprintf(str, sizeof(str),"%s",address_to_str(&pinfo->net_src)); tick_stat_node(st, str, st_node_ip, FALSE); - g_snprintf((char*)str, sizeof(str),"%s",address_to_str(&pinfo->net_dst)); + g_snprintf(str, sizeof(str),"%s",address_to_str(&pinfo->net_dst)); tick_stat_node(st, str, st_node_ip, FALSE); return 1; @@ -98,7 +98,7 @@ static void plen_stats_tree_init(stats_tree* st) { } static int plen_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) { - tick_stat_node(st, (guint8*)st_str_plen, 0, FALSE); + tick_stat_node(st, st_str_plen, 0, FALSE); stats_tree_tick_range(st, st_str_plen, 0, pinfo->fd->pkt_len); return 1; @@ -122,14 +122,14 @@ static int dsts_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_disse int ip_dst_node; int proto_node; - tick_stat_node(st, (guint8*)st_str_dsts, 0, FALSE); + tick_stat_node(st, st_str_dsts, 0, FALSE); - g_snprintf((char*)str, sizeof(str),"%s",address_to_str(&pinfo->net_src)); + g_snprintf(str, sizeof(str),"%s",address_to_str(&pinfo->net_src)); ip_dst_node = tick_stat_node(st, str, st_node_dsts, TRUE); - proto_node = tick_stat_node(st,(guint8*)port_type_to_str(pinfo->ptype),ip_dst_node,TRUE); + proto_node = tick_stat_node(st,port_type_to_str(pinfo->ptype),ip_dst_node,TRUE); - g_snprintf((char*)str, sizeof(str),"%u",pinfo->destport); + g_snprintf(str, sizeof(str),"%u",pinfo->destport); tick_stat_node(st,str,proto_node,TRUE); return 1; @@ -137,9 +137,9 @@ static int dsts_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_disse /* register all pinfo trees */ void register_pinfo_stat_trees(void) { - stats_tree_register((guint8*)"ip",(guint8*)"ip_hosts",(guint8*)st_str_ip, ip_hosts_stats_tree_packet, ip_hosts_stats_tree_init, NULL ); - stats_tree_register((guint8*)"ip",(guint8*)"ptype",(guint8*)st_str_ptype, ptype_stats_tree_packet, ptype_stats_tree_init, NULL ); - stats_tree_register((guint8*)"frame",(guint8*)"plen",(guint8*)st_str_plen, plen_stats_tree_packet, plen_stats_tree_init, NULL ); - stats_tree_register((guint8*)"ip",(guint8*)"dests",(guint8*)st_str_dsts, dsts_stats_tree_packet, dsts_stats_tree_init, NULL ); + stats_tree_register("ip","ip_hosts",st_str_ip, ip_hosts_stats_tree_packet, ip_hosts_stats_tree_init, NULL ); + stats_tree_register("ip","ptype",st_str_ptype, ptype_stats_tree_packet, ptype_stats_tree_init, NULL ); + stats_tree_register("frame","plen",st_str_plen, plen_stats_tree_packet, plen_stats_tree_init, NULL ); + stats_tree_register("ip","dests",st_str_dsts, dsts_stats_tree_packet, dsts_stats_tree_init, NULL ); } |