From 8bd63258a538ea59782cdb2e14614f1cfb3b3a37 Mon Sep 17 00:00:00 2001 From: Peter Bloomfield Date: Mon, 27 Jun 2022 17:42:11 -0400 Subject: [PATCH] dataset: Improve readability Improve the readability by using a temporary variable --- glib/gdataset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glib/gdataset.c b/glib/gdataset.c index 2ac78b9d5..88306c389 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -526,11 +526,14 @@ g_data_remove_internal (GData **datalist, if (remove) { + GDataElt *data_last = data_end - 1; + found_keys++; - if (data < --data_end) - *data = *data_end; + if (data < data_last) + *data = *data_last; + data_end--; d->len--; /* We don't bother to shrink, but if all data are now gone