]> sigrok.org Git - libsigrok.git/commitdiff
hp-3478a: revert the recent NULL dereference check in config API routines
authorGerhard Sittig <redacted>
Wed, 30 Jun 2021 18:13:21 +0000 (20:13 +0200)
committerGerhard Sittig <redacted>
Sun, 21 Aug 2022 15:45:11 +0000 (17:45 +0200)
Undo commit 020df861e0eb before replacing it with something better.

src/hardware/hp-3478a/api.c

index 0c461bb1740bebd4c4c4f1e41b892cfac1248057..c1e494dff41680ca47419a74a3afd20161bc5cc1 100644 (file)
@@ -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: