Re: [PATCH] iio: multiplexer: fix unsigned check with less than zero

2017-03-08 Thread Peter Rosin
On 2017-03-07 16:06, Colin King wrote: > From: Colin Ian King > > Comparing a size_t with less than zero is always false as size_t > is unsigned. The intent of the comparison was to check if the size > was -1 (that is, undefined), so use that instead. > > Detected by CoverityScan, CID#1415278 ("

Re: [PATCH] iio: multiplexer: fix unsigned check with less than zero

2017-03-08 Thread Colin Ian King
On 08/03/17 08:59, Peter Rosin wrote: > On 2017-03-07 16:06, Colin King wrote: >> From: Colin Ian King >> >> Comparing a size_t with less than zero is always false as size_t >> is unsigned. The intent of the comparison was to check if the size >> was -1 (that is, undefined), so use that instead. >

[PATCH] iio: multiplexer: fix unsigned check with less than zero

2017-03-07 Thread Colin King
From: Colin Ian King Comparing a size_t with less than zero is always false as size_t is unsigned. The intent of the comparison was to check if the size was -1 (that is, undefined), so use that instead. Detected by CoverityScan, CID#1415278 ("Unsigned compared against 0") Signed-off-by: Colin I