From 0aaaee2dd325c81b31ac2c285f4bbe0990b9cc8a Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 3 Mar 2018 19:24:35 +0100 Subject: [PATCH] arachnid-labs-re-load-pro: Simplify a code chunk. --- src/hardware/arachnid-labs-re-load-pro/api.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index 5cef7758..cfb413d5 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -247,12 +247,8 @@ static int config_get(uint32_t key, GVariant **data, *data = g_variant_new_boolean(devc->otp_active); break; case SR_CONF_UNDER_VOLTAGE_CONDITION: - if (reloadpro_get_under_voltage_threshold(sdi, &fvalue) == SR_OK) { - if (fvalue == .0) - *data = g_variant_new_boolean(FALSE); - else - *data = g_variant_new_boolean(TRUE); - } + if (reloadpro_get_under_voltage_threshold(sdi, &fvalue) == SR_OK) + *data = g_variant_new_boolean(fvalue != 0.0); break; case SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE: *data = g_variant_new_boolean(devc->uvc_active);