From 8f14effc02e20fe562f1081b8155e7fb93b22dcf Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 16 May 2018 00:24:56 +0200 Subject: instance.c: Fix a scan-build warning. instance.c:278:25: warning: The left operand of '!=' is a garbage value if (new_channelmap[i] != -1) ~~~~~~~~~~~~~~~~~ ^ --- instance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instance.c b/instance.c index a94118f..17809be 100644 --- a/instance.c +++ b/instance.c @@ -223,7 +223,7 @@ SRD_API int srd_inst_channel_set_all(struct srd_decoder_inst *di, return SRD_ERR_ARG; } - new_channelmap = g_malloc(sizeof(int) * di->dec_num_channels); + new_channelmap = g_malloc0(sizeof(int) * di->dec_num_channels); /* * For now, map all indexes to channel -1 (can be overridden later). -- cgit v1.2.3-70-g09d2