[MPlayer-dev-eng] [PATCH] gui/menu: optimize language table.

Ingo Brückl ib at wupperonline.de
Sun Feb 14 00:10:31 CET 2016


Reimar Döffinger wrote on Sat, 13 Feb 2016 23:50:48 +0100:

> Store fixed size 4 entry directly
> instead of via pointer.

> diff --git a/gui/dialog/menu.c b/gui/dialog/menu.c
> index de6f45f..fcb56fb 100644
> +++ b/gui/dialog/menu.c
> @@ -230,7 +230,7 @@ GtkWidget * AddSeparator( GtkWidget * Menu )
>  typedef struct
>  {
>   int id;
> - const char * id2;
> + const char id2[4];
>   const char * name;
>  } Languages_t;

I can sense Coverity on strcasecmp(Languages[i].id2, p). After fixing id2[3]
seems enough.

Ingo


More information about the MPlayer-dev-eng mailing list