* lib/cfg.c (corosync_cfg_ring_status_get): Avoid useless if-before-free
and change syntax to avoid triggering false-positive failure of
the "make syntax-check" sc_cast_of_argument_to_free rule.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2189
fd59a12c-fef9-0310-b244-
a6a79926bd2f
error_free_contents:
for (i = 0; i < res_lib_cfg_ringstatusget.interface_count; i++) {
- if ((*(interface_names))[i]) {
- free ((*(interface_names))[i]);
- }
- if ((*(status))[i]) {
- free ((*(status))[i]);
- }
+ free (*interface_names + i);
+ free (*status + i);
}
free (*status);