From: Gerhard Sittig Date: Wed, 30 Jun 2021 18:13:21 +0000 (+0200) Subject: hp-3478a: revert the recent NULL dereference check in config API routines X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2881eef6ff9b33741337017045d4f98153a91f1c;p=libsigrok.git hp-3478a: revert the recent NULL dereference check in config API routines Undo commit 020df861e0eb before replacing it with something better. --- diff --git a/src/hardware/hp-3478a/api.c b/src/hardware/hp-3478a/api.c index 0c461bb1..c1e494df 100644 --- a/src/hardware/hp-3478a/api.c +++ b/src/hardware/hp-3478a/api.c @@ -192,7 +192,7 @@ static int config_get(uint32_t key, GVariant **data, (void)cg; - devc = sdi ? sdi->priv : NULL; + devc = sdi->priv; switch (key) { case SR_CONF_LIMIT_SAMPLES: @@ -247,7 +247,7 @@ static int config_set(uint32_t key, GVariant *data, (void)cg; - devc = sdi ? sdi->priv : NULL; + devc = sdi->priv; switch (key) { case SR_CONF_LIMIT_SAMPLES: @@ -294,7 +294,7 @@ static int config_list(uint32_t key, GVariant **data, GVariant *gvar, *arr[2]; GVariantBuilder gvb; - devc = sdi ? sdi->priv : NULL; + devc = sdi->priv; switch (key) { case SR_CONF_SCAN_OPTIONS: