From: Uwe Hermann Date: Thu, 26 Mar 2015 20:56:29 +0000 (+0100) Subject: Minor cosmetics. X-Git-Tag: sigrok-cli-0.6.0~33 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=23c40b60cd87f9779c6e99a99653f7c68682c852;p=sigrok-cli.git Minor cosmetics. --- diff --git a/session.c b/session.c index 86eea7c..9fa545e 100644 --- a/session.c +++ b/session.c @@ -53,7 +53,7 @@ static int set_limit_time(const struct sr_dev_inst *sdi) } } else if (config_key_has_cap(driver, sdi, NULL, SR_CONF_SAMPLERATE, SR_CONF_GET | SR_CONF_SET)) { - /* Convert to samples based on the samplerate. */ + /* Convert to samples based on the samplerate. */ sr_config_get(driver, sdi, NULL, SR_CONF_SAMPLERATE, &gvar); samplerate = g_variant_get_uint64(gvar); g_variant_unref(gvar); @@ -171,7 +171,7 @@ void datafeed_in(const struct sr_dev_inst *sdi, driver = sr_dev_inst_driver_get(sdi); /* If the first packet to come in isn't a header, don't even try. */ - if (packet->type != SR_DF_HEADER && o == NULL) + if (packet->type != SR_DF_HEADER && !o) return; session = cb_data; @@ -371,7 +371,7 @@ int opt_to_gvar(char *key, char *value, struct sr_config *src) } src->key = srci->key; - if ((value == NULL || strlen(value) == 0) && + if ((!value || strlen(value) == 0) && (srci->datatype != SR_T_BOOL)) { g_critical("Option '%s' needs a value.", (char *)key); return -1;