[PATCH] xfree86: fix not reached code in parser

Dan Nicholson dbn.lists at gmail.com
Sat Apr 17 08:07:02 PDT 2010


On Fri, Apr 16, 2010 at 7:24 AM, Tiago Vignatti
<tiago.vignatti at nokia.com> wrote:
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
>  hw/xfree86/parser/read.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
> index 1091be5..4e42b24 100644
> --- a/hw/xfree86/parser/read.c
> +++ b/hw/xfree86/parser/read.c
> @@ -219,15 +219,15 @@ xf86readConfigFile (void)
>                        }
>                        else
>                        {
> -                               Error (INVALID_SECTION_MSG, xf86tokenString ());
>                                free(val.str);
>                                val.str = NULL;
> +                               Error (INVALID_SECTION_MSG, xf86tokenString ());
>                        }
>                        break;
>                default:
> -                       Error (INVALID_KEYWORD_MSG, xf86tokenString ());
>                        free(val.str);
>                        val.str = NULL;
> +                       Error (INVALID_KEYWORD_MSG, xf86tokenString ());
>                }
>        }
>
> --
> 1.6.0.4

This is because Error is a macro that returns NULL. It'd be nice to
say that in the commit message.

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>


More information about the xorg-devel mailing list