• Alejandro Martinez Ruiz's avatar
    sk98lin: kill bogus check and convert to use ARRAY_SIZE() · ef878b88
    Alejandro Martinez Ruiz authored
    This converts uses of ARRAY_SIZE(), and while at it also kills
    unreachable code as far as I can say. I can't tell what was the author
    trying to do with the following check. First we have:
    
    PNMI_STATIC const SK_PNMI_STATADDR
    		StatAddr[SK_PNMI_MAX_IDX][SK_PNMI_MAC_TYPES];
    
    and then a check goes like this:
    
    if (SK_PNMI_MAX_IDX !=
       (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)))
    
    with the second line being just ARRAY_SIZE(StatAddr), which will always
    return SK_PNMI_MAX_IDX, rendering the check useless.
    Signed-off-by: default avatarAlejandro Martinez Ruiz <alex@flawedcode.org>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    ef878b88
skgemib.c 30 KB