From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxfUN-0007eB-QR for qemu-devel@nongnu.org; Wed, 27 May 2015 13:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxfUM-0000cS-W5 for qemu-devel@nongnu.org; Wed, 27 May 2015 13:51:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxfUM-0000cM-Qi for qemu-devel@nongnu.org; Wed, 27 May 2015 13:51:34 -0400 From: Markus Armbruster Date: Wed, 27 May 2015 19:51:30 +0200 Message-Id: <1432749090-4698-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH] Revert "target-arm: Avoid g_hash_table_get_keys()" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Since we now require GLib 2.22+ (commit f40685c), we don't have to work around lack of g_hash_table_get_keys() anymore. This reverts commit 82a3a11897308b606120f7235001e87809708f85. Signed-off-by: Markus Armbruster --- target-arm/helper.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 5d0f011..56c764a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -294,23 +294,15 @@ static gint cpreg_key_compare(gconstpointer a, gconstpointer b) return 0; } -static void cpreg_make_keylist(gpointer key, gpointer value, gpointer udata) -{ - GList **plist = udata; - - *plist = g_list_prepend(*plist, key); -} - void init_cpreg_list(ARMCPU *cpu) { /* Initialise the cpreg_tuples[] array based on the cp_regs hash. * Note that we require cpreg_tuples[] to be sorted by key ID. */ - GList *keys = NULL; + GList *keys; int arraylen; - g_hash_table_foreach(cpu->cp_regs, cpreg_make_keylist, &keys); - + keys = g_hash_table_get_keys(cpu->cp_regs); keys = g_list_sort(keys, cpreg_key_compare); cpu->cpreg_array_len = 0; -- 1.9.3