remove a test for NULL we dont need since itlq can not be null here and thus we
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 1 May 2006 07:32:09 +0000 (07:32 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 1 May 2006 07:32:09 +0000 (07:32 +0000)
dont need to test for it.

this unnecessary test for itlq==NULL was shown by coverity issue 151

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18052 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-scsi.c

index 9e6da816ba56d620b0370da8b3250f27939009d2..24c01aec809b8eec7d2af91bc0e087b8200263b4 100644 (file)
@@ -6302,7 +6302,7 @@ dissect_scsi_rsp (tvbuff_t *tvb, packet_info *pinfo,
     cdata->type=SCSI_PDU_TYPE_RSP;
     tap_queue_packet(scsi_tap, pinfo, cdata);
 
-    csdata=get_cmdset_data(itlq, itl);
+    csdata=get_cmdset_data(itlq, itl);   /* will gassert if itlq is null */
 
     /* Nothing really to do here, just print some stuff passed to us
      */
@@ -6323,7 +6323,7 @@ dissect_scsi_rsp (tvbuff_t *tvb, packet_info *pinfo,
         ti=proto_tree_add_uint_format(scsi_tree, hf_scsi_inq_devtype, tvb, 0, 0, itl->cmdset, "Command Set:%s (0x%02x)", val_to_str(itl->cmdset, scsi_devtype_val, "Unknown"), itl->cmdset);
         PROTO_ITEM_SET_GENERATED(ti);
 
-        if(itlq && itlq->scsi_opcode!=0xffff){
+        if(itlq->scsi_opcode!=0xffff){
             ti=proto_tree_add_uint(scsi_tree, csdata->hf_opcode, tvb, 0, 0, itlq->scsi_opcode);
             PROTO_ITEM_SET_GENERATED(ti);
         }