Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1203657 > unrolled thread
| Started by | Chandra S Gorentla <csgorentla@gmail.com> |
|---|---|
| First post | 2015-08-09 17:40 +0200 |
| Last post | 2015-08-10 06:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] staging: wilc1000: Remove pointer and integer comparision Chandra S Gorentla <csgorentla@gmail.com> - 2015-08-09 17:40 +0200
Re: [PATCH v2] staging: wilc1000: Remove pointer and integer comparision Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-10 06:40 +0200
| From | Chandra S Gorentla <csgorentla@gmail.com> |
|---|---|
| Date | 2015-08-09 17:40 +0200 |
| Subject | [PATCH v2] staging: wilc1000: Remove pointer and integer comparision |
| Message-ID | <pVARA-1KR-9@gated-at.bofh.it> |
Removed pointer check with integer; this fixes 'sparse' error - error: incompatible types for operation (>) left side has type unsigned char [usertype] *[usertype] pu8Tail right side has type int Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com> --- Changes in v2: Subject line corrected wilc100 -> wilc1000 drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cc549c2..4ba1ad7 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3471,7 +3471,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >> 24) & 0xFF); /* Bug 4599 : if tail length = 0 skip copying */ - if (pstrSetBeaconParam->pu8Tail > 0) + if (pstrSetBeaconParam->pu8Tail != NULL) memcpy(pu8CurrByte, pstrSetBeaconParam->pu8Tail, pstrSetBeaconParam->u32TailLen); pu8CurrByte += pstrSetBeaconParam->u32TailLen; -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-08-10 06:40 +0200 |
| Subject | Re: [PATCH v2] staging: wilc1000: Remove pointer and integer comparision |
| Message-ID | <pVN2p-3aB-5@gated-at.bofh.it> |
| In reply to | #1203657 |
On Sun, Aug 09, 2015 at 09:05:11PM +0530, Chandra S Gorentla wrote: > Removed pointer check with integer; this fixes 'sparse' error - > error: incompatible types for operation (>) > left side has type unsigned char [usertype] *[usertype] pu8Tail > right side has type int > > Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com> > --- > Changes in v2: Subject line corrected wilc100 -> wilc1000 > > drivers/staging/wilc1000/host_interface.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c > index cc549c2..4ba1ad7 100644 > --- a/drivers/staging/wilc1000/host_interface.c > +++ b/drivers/staging/wilc1000/host_interface.c > @@ -3471,7 +3471,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco > *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >> 24) & 0xFF); > > /* Bug 4599 : if tail length = 0 skip copying */ > - if (pstrSetBeaconParam->pu8Tail > 0) > + if (pstrSetBeaconParam->pu8Tail != NULL) This NULL test can be better wriiten as if (pstrSetBeaconParam->pu8Tail) regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web