Get rid of some more g_assert*()'s in the dissectors. There are a few
remaining that I'm not sure exactly what to do with at the moment: the one in packet-frame probably should be there, the others probably shouldn't but they also should never fail unless there's a compile or build problem (AFAICS). svn path=/trunk/; revision=21367
This commit is contained in:
parent
7e2cb04ebf
commit
4d21c49929
|
@ -451,7 +451,7 @@ h263_proto_tree_add_bits(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
g_assert_not_reached();
|
DISSECTOR_ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare the string */
|
/* prepare the string */
|
||||||
|
|
|
@ -205,7 +205,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
/* simple IPDC_ASCII strings */
|
/* simple IPDC_ASCII strings */
|
||||||
case IPDC_ASCII:
|
case IPDC_ASCII:
|
||||||
g_assert(len<=IPDC_STR_LEN);
|
DISSECTOR_ASSERT(len<=IPDC_STR_LEN);
|
||||||
tvb_memcpy(tvb, tmp_tag_text, offset+2, len);
|
tvb_memcpy(tvb, tmp_tag_text, offset+2, len);
|
||||||
tmp_tag_text[len] = 0;
|
tmp_tag_text[len] = 0;
|
||||||
proto_tree_add_text(tag_tree, tvb, offset,
|
proto_tree_add_text(tag_tree, tvb, offset,
|
||||||
|
|
|
@ -941,10 +941,8 @@ DEBUG_ENTRY("dissect_per_constrained_integer");
|
||||||
timeval.secs=val; timeval.nsecs=0;
|
timeval.secs=val; timeval.nsecs=0;
|
||||||
/* 10.5.4 If "range" has the value 1, then the result of the encoding shall be an empty bit-field (no bits).*/
|
/* 10.5.4 If "range" has the value 1, then the result of the encoding shall be an empty bit-field (no bits).*/
|
||||||
|
|
||||||
if(range==0){
|
/* something is really wrong if range is 0 */
|
||||||
/* something is really wrong if range is 0 */
|
DISSECTOR_ASSERT(range!=0);
|
||||||
g_assert_not_reached();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(range==1){
|
if(range==1){
|
||||||
val_start = offset>>3; val_length = 0;
|
val_start = offset>>3; val_length = 0;
|
||||||
|
|
|
@ -1261,7 +1261,7 @@ extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_i
|
||||||
radius_attr_info_t* dictionary_entry;
|
radius_attr_info_t* dictionary_entry;
|
||||||
GHashTable* by_id;
|
GHashTable* by_id;
|
||||||
|
|
||||||
g_assert(radius_avp_dissector != NULL);
|
DISSECTOR_ASSERT(radius_avp_dissector != NULL);
|
||||||
|
|
||||||
if (vendor_id) {
|
if (vendor_id) {
|
||||||
vendor = g_hash_table_lookup(dict->vendors_by_id,GUINT_TO_POINTER(vendor_id));
|
vendor = g_hash_table_lookup(dict->vendors_by_id,GUINT_TO_POINTER(vendor_id));
|
||||||
|
|
|
@ -4421,10 +4421,10 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
pinfo->current_proto="SCSI";
|
pinfo->current_proto="SCSI";
|
||||||
|
|
||||||
if(!itlq){
|
if(!itlq){
|
||||||
g_assert_not_reached();
|
DISSECTOR_ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
if(!itl){
|
if(!itl){
|
||||||
g_assert_not_reached();
|
DISSECTOR_ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
opcode = tvb_get_guint8 (tvb, offset);
|
opcode = tvb_get_guint8 (tvb, offset);
|
||||||
|
@ -4723,7 +4723,7 @@ get_cmdset_data(itlq_nexus_t *itlq, itl_nexus_t *itl)
|
||||||
|
|
||||||
/* we must have an itlq structure */
|
/* we must have an itlq structure */
|
||||||
if(!itlq){
|
if(!itlq){
|
||||||
g_assert_not_reached();
|
DISSECTOR_ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(itl){
|
if(itl){
|
||||||
|
|
Loading…
Reference in New Issue