Skip to content

Commit

Permalink
contrib/vhost-user-blk: add missing GOptionEntry NULL terminator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stefanhaRH committed Apr 21, 2022
1 parent 747421e commit 096b778
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/vhost-user-blk/vhost-user-blk.c
Expand Up @@ -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)
Expand Down

0 comments on commit 096b778

Please sign in to comment.