lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Mar 2017 18:03:08 +0530 From: simran singhal <singhalsimran0@...il.com> To: jic23@...nel.org Cc: knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, outreachy-kernel@...glegroups.com Subject: [PATCH 1/4] iio: common: st_sensors: Replace ternary operator with min macro Use macro min() to get the minimum of two values for brevity and readability. Signed-off-by: simran singhal <singhalsimran0@...il.com> --- drivers/iio/common/st_sensors/st_sensors_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index c83df4d..7a68fdd 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -39,7 +39,7 @@ static int st_sensors_i2c_read_byte(struct st_sensor_transfer_buffer *tb, *res_byte = err & 0xff; st_accel_i2c_read_byte_error: - return err < 0 ? err : 0; + return min(err, 0); } static int st_sensors_i2c_read_multiple_byte( -- 2.7.4
Powered by blists - more mailing lists