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:
Jeff Morriss 2007-04-10 14:48:06 +00:00
parent 7e2cb04ebf
commit 4d21c49929
5 changed files with 8 additions and 10 deletions

View File

@ -451,7 +451,7 @@ h263_proto_tree_add_bits(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint bit
}
}else{
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
}
/* prepare the string */

View File

@ -205,7 +205,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (type) {
/* simple IPDC_ASCII strings */
case IPDC_ASCII:
g_assert(len<=IPDC_STR_LEN);
DISSECTOR_ASSERT(len<=IPDC_STR_LEN);
tvb_memcpy(tvb, tmp_tag_text, offset+2, len);
tmp_tag_text[len] = 0;
proto_tree_add_text(tag_tree, tvb, offset,

View File

@ -941,10 +941,8 @@ DEBUG_ENTRY("dissect_per_constrained_integer");
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).*/
if(range==0){
/* something is really wrong if range is 0 */
g_assert_not_reached();
}
/* something is really wrong if range is 0 */
DISSECTOR_ASSERT(range!=0);
if(range==1){
val_start = offset>>3; val_length = 0;

View File

@ -1261,7 +1261,7 @@ extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_i
radius_attr_info_t* dictionary_entry;
GHashTable* by_id;
g_assert(radius_avp_dissector != NULL);
DISSECTOR_ASSERT(radius_avp_dissector != NULL);
if (vendor_id) {
vendor = g_hash_table_lookup(dict->vendors_by_id,GUINT_TO_POINTER(vendor_id));

View File

@ -4421,10 +4421,10 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pinfo->current_proto="SCSI";
if(!itlq){
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
}
if(!itl){
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
}
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 */
if(!itlq){
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
}
if(itl){