From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmOSx-0005Dd-Ui for qemu-devel@nongnu.org; Mon, 19 May 2014 10:23:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmOSp-00047y-Jc for qemu-devel@nongnu.org; Mon, 19 May 2014 10:22:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmOSp-00047s-Bq for qemu-devel@nongnu.org; Mon, 19 May 2014 10:22:51 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEMnRU021790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 19 May 2014 10:22:50 -0400 From: Kevin Wolf Date: Mon, 19 May 2014 16:22:20 +0200 Message-Id: <1400509360-25470-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1400509360-25470-1-git-send-email-kwolf@redhat.com> References: <1400509360-25470-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 02/22] Remove g_sequence_lookup from qemu-img help function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Mike Day g_sequence_lookup is not supported by glib < 2.28. The usage of g_sequence_lookup is not essential in this context (it's a safeguard against duplicate values in the help message). Removing the call enables the build on all platforms and does not change the operation of the help function. Signed-off-by: Mike Day Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 04ce02a..1ad899e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -70,11 +70,8 @@ static void add_format_to_seq(void *opaque, const char *fmt_name) { GSequence *seq = opaque; - if (!g_sequence_lookup(seq, (gpointer)fmt_name, - compare_data, NULL)) { - g_sequence_insert_sorted(seq, (gpointer)fmt_name, - compare_data, NULL); - } + g_sequence_insert_sorted(seq, (gpointer)fmt_name, + compare_data, NULL); } static void QEMU_NORETURN GCC_FMT_ATTR(1, 2) error_exit(const char *fmt, ...) -- 1.8.3.1