diff mbox

[v4l-utils,1/1] media-ctl: Fix bad long option crash

Message ID 1447760458-8327-1-git-send-email-sakari.ailus@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sakari Ailus Nov. 17, 2015, 11:40 a.m. UTC
The long options array has to be followed by an all-zero entry. There was
none.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 utils/media-ctl/options.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart Nov. 17, 2015, 1:11 p.m. UTC | #1
Hi Sakari,

Thank you for the patch.

On Tuesday 17 November 2015 13:40:58 Sakari Ailus wrote:
> The long options array has to be followed by an all-zero entry. There was
> none.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  utils/media-ctl/options.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/utils/media-ctl/options.c b/utils/media-ctl/options.c
> index ffaffcd..2751e6e 100644
> --- a/utils/media-ctl/options.c
> +++ b/utils/media-ctl/options.c
> @@ -97,6 +97,7 @@ static struct option opts[] = {
>  	{"print-topology", 0, 0, 'p'},
>  	{"reset", 0, 0, 'r'},
>  	{"verbose", 0, 0, 'v'},
> +	{ },
>  };
> 
>  int parse_cmdline(int argc, char **argv)
diff mbox

Patch

diff --git a/utils/media-ctl/options.c b/utils/media-ctl/options.c
index ffaffcd..2751e6e 100644
--- a/utils/media-ctl/options.c
+++ b/utils/media-ctl/options.c
@@ -97,6 +97,7 @@  static struct option opts[] = {
 	{"print-topology", 0, 0, 'p'},
 	{"reset", 0, 0, 'r'},
 	{"verbose", 0, 0, 'v'},
+	{ },
 };
 
 int parse_cmdline(int argc, char **argv)