On Tue,  7 Jul 2015 11:35:04 +0300
Pekka Paalanen <[email protected]> wrote:

> From: Pekka Paalanen <[email protected]>
> 
> If a user gives multiple patterns or extra arguments, only the last one
> was used as the pattern while the former were just ignored. This is a
> user error silently converted to something possibly unexpected.
> 
> In presence of extra arguments, complain and quit.
> 
> Cc: Ben Avison <[email protected]>
> Signed-off-by: Pekka Paalanen <[email protected]>
> ---
>  test/lowlevel-blt-bench.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/test/lowlevel-blt-bench.c b/test/lowlevel-blt-bench.c
> index fc7472f..28ff669 100644
> --- a/test/lowlevel-blt-bench.c
> +++ b/test/lowlevel-blt-bench.c
> @@ -1122,6 +1122,12 @@ main (int argc, char *argv[])
>       }
>       else
>       {
> +         if (pattern)
> +         {
> +             pattern = NULL;
> +             printf ("Error: extra arguments given.\n");
> +             break;
> +         }
>           pattern = argv[i];
>       }
>      }

Hi,

since no-one objected and this is quite trivial, pushed:
   6961147..fd59569  master -> master


Thanks,
pq

Attachment: pgpbIo3FbIXWc.pgp
Description: OpenPGP digital signature

_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to