]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
contrib/vhost-user-blk: add missing GOptionEntry NULL terminator
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 11 Apr 2022 15:00:57 +0000 (16:00 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 21 Apr 2022 10:01:24 +0000 (12:01 +0200)
The GLib documentation says "a NULL-terminated array of GOptionEntrys"
so we'd better make sure there is a terminator that lets
g_option_context_add_main_entries() know when the end of the array has
been reached.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 20220411150057.3009667-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
contrib/vhost-user-blk/vhost-user-blk.c

index d14b2896bf00ecc819c9eeb3c1dbff5d9cd75595..cd4a5d7335a5ccb9c620be53c8ca9d905ab2cee4 100644 (file)
@@ -593,7 +593,8 @@ static GOptionEntry entries[] = {
     {"blk-file", 'b', 0, G_OPTION_ARG_FILENAME, &opt_blk_file,
      "block device or file path", "PATH"},
     { "read-only", 'r', 0, G_OPTION_ARG_NONE, &opt_read_only,
-      "Enable read-only", NULL }
+      "Enable read-only", NULL },
+    { NULL, },
 };
 
 int main(int argc, char **argv)