]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
Remove g_sequence_lookup from qemu-img help function
authorMike Day <ncmike@ncultra.org>
Tue, 13 May 2014 21:11:06 +0000 (17:11 -0400)
committerKevin Wolf <kwolf@redhat.com>
Mon, 19 May 2014 09:36:48 +0000 (11:36 +0200)
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 <ncmike@ncultra.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c

index 04ce02aeb4da61bc0a15d8c2ff9b373c3097aec3..1ad899e03bec185fd2db00f4418fe2c6f70eb0ea 100644 (file)
@@ -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, ...)