trivial: do an assignment before the conditional instead of in both branches

[lkundrak@v3.sk: An improvement suggested in bugzilla, but I failed to apply
it to the commit.]

https://bugzilla.redhat.com/show_bug.cgi?id=1079353
This commit is contained in:
Thomas Haller 2015-03-16 15:43:12 +01:00 committed by Lubomir Rintel
parent 641a57994c
commit 2e86c37dd3

View file

@ -681,6 +681,8 @@ object_property_complete (ObjectCreatedData *odata)
for (i = 0; i < odata->length; i++)
add_to_object_array_unique (new, odata->objects[i]);
*((GPtrArray **) pi->field) = new;
if (pi->signal_prefix) {
GPtrArray *added = g_ptr_array_sized_new (3);
GPtrArray *removed = g_ptr_array_sized_new (3);
@ -691,8 +693,6 @@ object_property_complete (ObjectCreatedData *odata)
/* Find objects in 'new' that do not exist in old */
array_diff (new, old, added);
*((GPtrArray **) pi->field) = new;
/* Emit added & removed */
for (i = 0; i < removed->len; i++) {
queue_added_removed_signal (self,
@ -715,7 +715,6 @@ object_property_complete (ObjectCreatedData *odata)
/* No added/removed signals to send, just replace the property with
* the new values.
*/
*((GPtrArray **) pi->field) = new;
different = TRUE;
}