From: Gerhard Sittig Date: Sun, 20 Feb 2022 09:02:15 +0000 (+0100) Subject: kingst-la2016: prefer boolean data type for bool information X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7a38cdf76678a64f6bfc9178e623f9f9cecfcd4b;p=libsigrok.git kingst-la2016: prefer boolean data type for bool information The la2016_is_idle() routine provided boolean information in an 'int' data type. Prefer gboolean instead. --- diff --git a/src/hardware/kingst-la2016/protocol.c b/src/hardware/kingst-la2016/protocol.c index 596b085c..e59bae0a 100644 --- a/src/hardware/kingst-la2016/protocol.c +++ b/src/hardware/kingst-la2016/protocol.c @@ -915,15 +915,15 @@ static uint16_t run_state(const struct sr_dev_inst *sdi) return state; } -static int la2016_is_idle(const struct sr_dev_inst *sdi) +static gboolean la2016_is_idle(const struct sr_dev_inst *sdi) { uint16_t state; state = run_state(sdi); if ((state & runstate_mask_idle) == runstate_patt_idle) - return 1; + return TRUE; - return 0; + return FALSE; } static int set_run_mode(const struct sr_dev_inst *sdi, uint8_t mode)