Clang 3.7 warns about this. The rings are arrays, not pointers, so they
can't be NULL.

ok? Or should these checks be replaced rather than removed?


Index: dev/ic/ti.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ti.c,v
retrieving revision 1.22
diff -u -p -r1.22 ti.c
--- dev/ic/ti.c 25 Nov 2015 03:09:58 -0000      1.22
+++ dev/ic/ti.c 5 Feb 2016 05:34:14 -0000
@@ -484,9 +484,6 @@ ti_handle_events(struct ti_softc *sc)
        struct ti_event_desc    *e;
        struct ifnet            *ifp = &sc->arpcom.ac_if;
 
-       if (sc->ti_rdata->ti_event_ring == NULL)
-               return;
-
        while (sc->ti_ev_saved_considx != sc->ti_ev_prodidx.ti_idx) {
                e = &sc->ti_rdata->ti_event_ring[sc->ti_ev_saved_considx];
                switch (TI_EVENT_EVENT(e)) {
@@ -846,9 +843,6 @@ ti_free_tx_ring(struct ti_softc *sc)
 {
        int             i;
        struct ti_txmap_entry *entry;
-
-       if (sc->ti_rdata->ti_tx_ring == NULL)
-               return;
 
        for (i = 0; i < TI_TX_RING_CNT; i++) {
                if (sc->ti_cdata.ti_tx_chain[i] != NULL) {

Reply via email to