From: Uwe Hermann Date: Tue, 7 Feb 2017 09:40:29 +0000 (+0100) Subject: instance.c: Fix a compiler warning. X-Git-Tag: libsigrokdecode-0.5.0~81 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9bac00e0b211579935640bb4d6fed988d2d148c4;p=libsigrokdecode.git 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)) ^~ --- 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; }