summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2017-02-07 10:40:29 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2017-02-20 16:28:27 +0100
commit9bac00e0b211579935640bb4d6fed988d2d148c4 (patch)
tree0742f4dc82b92f58b3d9dcca0644edd518257d4d
parent79d0013e85ca5ee5086ece1528b4403777a01f96 (diff)
downloadlibsigrokdecode-9bac00e0b211579935640bb4d6fed988d2d148c4.tar.gz
libsigrokdecode-9bac00e0b211579935640bb4d6fed988d2d148c4.zip
instance.c: Fix a compiler warning.
../instance.c: In function ‘srd_inst_find_by_id’: ../instance.c:485:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (di = srd_inst_find_by_id_stack(inst_id, tmp)) ^~
-rw-r--r--instance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/instance.c b/instance.c
index 5b98336..00bc802 100644
--- a/instance.c
+++ b/instance.c
@@ -482,7 +482,7 @@ SRD_API struct srd_decoder_inst *srd_inst_find_by_id(struct srd_session *sess,
di = NULL;
for (l = sess->di_list; l; l = l->next) {
tmp = l->data;
- if (di = srd_inst_find_by_id_stack(inst_id, tmp))
+ if ((di = srd_inst_find_by_id_stack(inst_id, tmp)) != NULL)
break;
}