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

2017-03-11 Thread Jonathan Cameron
On 08/03/17 13:28, Peter Rosin wrote: > Comparing a size_t with less than zero is always false as size_t > is unsigned. So, change the type of the variable to ssize_t and > replicate the size check from mux_configure_channel() into > mux_write_ext_info() thus ensuring that the size will fit in the

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

2017-03-11 Thread Jonathan Cameron
On 08/03/17 13:28, Peter Rosin wrote: > Comparing a size_t with less than zero is always false as size_t > is unsigned. So, change the type of the variable to ssize_t and > replicate the size check from mux_configure_channel() into > mux_write_ext_info() thus ensuring that the size will fit in the

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

2017-03-08 Thread Peter Rosin
Comparing a size_t with less than zero is always false as size_t is unsigned. So, change the type of the variable to ssize_t and replicate the size check from mux_configure_channel() into mux_write_ext_info() thus ensuring that the size will fit in the ssize_t variable. Detected by CoverityScan,

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

2017-03-08 Thread Peter Rosin
Comparing a size_t with less than zero is always false as size_t is unsigned. So, change the type of the variable to ssize_t and replicate the size check from mux_configure_channel() into mux_write_ext_info() thus ensuring that the size will fit in the ssize_t variable. Detected by CoverityScan,