mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 13:40:39 +01:00
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:
parent
641a57994c
commit
2e86c37dd3
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue