staging: wilc1000: replace 'ptr > 0' check by 'ptr' check.
authorMario J. Rugiero <mrugiero@gmail.com>
Thu, 3 Dec 2015 16:24:05 +0000 (13:24 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:49:10 +0000 (14:49 -0800)
This silences a sparse warning about incompatible comparisons, while making the
intent of the check a bit clearer.

Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 36303c310c2c04da215fa1c251f0741670762a70..d1707f6f0dccd45b5c3051aaa3e79b438d2c3059 100644 (file)
@@ -2292,7 +2292,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv,
        *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >> 16) & 0xFF);
        *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >> 24) & 0xFF);
 
-       if (pstrSetBeaconParam->tail > 0)
+       if (pstrSetBeaconParam->tail)
                memcpy(pu8CurrByte, pstrSetBeaconParam->tail, pstrSetBeaconParam->tail_len);
        pu8CurrByte += pstrSetBeaconParam->tail_len;