fix a few potential use-before-check errors

Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
This commit is contained in:
Simon Budig
2014-08-16 00:29:16 +02:00
parent a102690145
commit 7928be2255
3 changed files with 5 additions and 4 deletions

View File

@ -533,9 +533,11 @@ ObjectList_t*
object_list_append_list(ObjectList_t *des, ObjectList_t *src)
{
GList *p;
if (!src)
return des;
for (p = src->list; p; p = p->next)
object_list_append(des, object_clone((Object_t*) p->data));
object_list_set_changed(des, (src) ? TRUE : FALSE);
object_list_set_changed(des, TRUE);
return des;
}