instance.c: Fix a compiler warning.
authorUwe Hermann <uwe@hermann-uwe.de>
Tue, 7 Feb 2017 09:40:29 +0000 (10:40 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Mon, 20 Feb 2017 15:28:27 +0000 (16:28 +0100)
  ../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))
     ^~

instance.c

index 5b98336a7946485c1842b74213ae1efa627d4227..00bc8023841334b54a0761cbccaaae82dd4eb0c5 100644 (file)
@@ -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;
        }