fix for coverity warnings
Costa Tsaousis (ktsaou) committed
Jan 2, 2017 at 02:26 UTC
76132515cc4774eb1a4f5e9d8e055c3f42fc54a5
1 file changed
+2
-2
src/ipc.c
+2
-2
@@ -209,8 +209,8 @@ int do_ipc(int update_every, usec_t dt) {
209
error("Unable to fetch semaphore limits.");
210
}
211
else {
212
- rrdvar_custom_host_variable_set(arrays_max, limits.semmni);
213
- rrdvar_custom_host_variable_set(semaphores_max, limits.semmns);
212
+ if(arrays_max) rrdvar_custom_host_variable_set(arrays_max, limits.semmni);
213
+ if(semaphores_max) rrdvar_custom_host_variable_set(semaphores_max, limits.semmns);
214
215
arrays->red = limits.semmni;
216
semaphores->red = limits.semmns;