oid_encoded2string() returns a const char *; don't assign it to a char
*. Don't declare variables in the middle of a block; not all the compilers we use support that. svn path=/trunk/; revision=33409
This commit is contained in:
parent
89015cb584
commit
63a0810874
|
@ -395,7 +395,7 @@ extern int dissect_snmp_VarBind(gboolean implicit_tag _U_,
|
|||
proto_item *pi_name, *pi_varbind, *pi_value = NULL;
|
||||
proto_tree *pt, *pt_varbind, *pt_name, *pt_value;
|
||||
char label[ITEM_LABEL_LENGTH];
|
||||
char* repr = NULL;
|
||||
const char* repr = NULL;
|
||||
const char* info_oid = NULL;
|
||||
char* valstr;
|
||||
int hfid = -1;
|
||||
|
@ -478,8 +478,10 @@ extern int dissect_snmp_VarBind(gboolean implicit_tag _U_,
|
|||
add_oid_debug_subtree(oid_info,pt_name);
|
||||
|
||||
if (!subids) {
|
||||
proto_item* pi;
|
||||
|
||||
repr = oid_encoded2string(oid_bytes, name_len);
|
||||
proto_item* pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
|
||||
pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
|
||||
pt = proto_item_add_subtree(pi, ett_decoding_error);
|
||||
expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "invalid oid: %s", repr);
|
||||
return dissect_unknown_ber(actx->pinfo, tvb, name_offset, pt);
|
||||
|
|
|
@ -497,7 +497,7 @@ extern int dissect_snmp_VarBind(gboolean implicit_tag _U_,
|
|||
proto_item *pi_name, *pi_varbind, *pi_value = NULL;
|
||||
proto_tree *pt, *pt_varbind, *pt_name, *pt_value;
|
||||
char label[ITEM_LABEL_LENGTH];
|
||||
char* repr = NULL;
|
||||
const char* repr = NULL;
|
||||
const char* info_oid = NULL;
|
||||
char* valstr;
|
||||
int hfid = -1;
|
||||
|
@ -580,8 +580,10 @@ extern int dissect_snmp_VarBind(gboolean implicit_tag _U_,
|
|||
add_oid_debug_subtree(oid_info,pt_name);
|
||||
|
||||
if (!subids) {
|
||||
proto_item* pi;
|
||||
|
||||
repr = oid_encoded2string(oid_bytes, name_len);
|
||||
proto_item* pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
|
||||
pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
|
||||
pt = proto_item_add_subtree(pi, ett_decoding_error);
|
||||
expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "invalid oid: %s", repr);
|
||||
return dissect_unknown_ber(actx->pinfo, tvb, name_offset, pt);
|
||||
|
@ -2698,7 +2700,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro
|
|||
|
||||
|
||||
/*--- End of included file: packet-snmp-fn.c ---*/
|
||||
#line 1478 "packet-snmp-template.c"
|
||||
#line 1480 "packet-snmp-template.c"
|
||||
|
||||
|
||||
guint
|
||||
|
@ -3553,7 +3555,7 @@ void proto_register_snmp(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-snmp-hfarr.c ---*/
|
||||
#line 2068 "packet-snmp-template.c"
|
||||
#line 2070 "packet-snmp-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -3593,7 +3595,7 @@ void proto_register_snmp(void) {
|
|||
&ett_snmp_RReqPDU_U,
|
||||
|
||||
/*--- End of included file: packet-snmp-ettarr.c ---*/
|
||||
#line 2084 "packet-snmp-template.c"
|
||||
#line 2086 "packet-snmp-template.c"
|
||||
};
|
||||
module_t *snmp_module;
|
||||
|
||||
|
|
Loading…
Reference in New Issue