https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229551

            Bug ID: 229551
           Summary: src/sys/dev/trm/trm.c:2484: bad if logic
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

src/sys/dev/trm/trm.c:2484] -> [src/sys/dev/trm/trm.c:2486]: (warning)
Identical inner 'if' condition is always true.

Source code is

 if ((((ptr->Vers & 0x07) >= 2) ||
                                              ((ptr->RDF & 0x0F) == 2)) &&
                                            (ptr->Flags & SCSI_INQ_CMDQUEUE) &&
                                            (pDCB->DevMode & TAG_QUEUING_) &&
                                            (pDCB->DevMode & EN_DISCONNECT_)) {
                                                if (pDCB->DevMode &
                                                    TAG_QUEUING_) {
                                                        pDCB->
                                                            MaxActiveCommandCnt
=
                                                          pACB->TagMaxNum;
                                                        pDCB->SyncMode |=
                                                          EN_TAG_QUEUING;
                                                        pDCB->tinfo.disc_tag |=
                                                          TRM_CUR_TAGENB;
                                                } else {

Duplicate in the TAG_QUEUING. Else clause can never run.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to