[Mesa-dev] [PATCH] glx/glvnd: list the strcmp arguments in correct order
Adam Jackson
ajax at redhat.com
Fri Sep 2 20:12:28 UTC 2016
On Thu, 2016-09-01 at 10:36 +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov at collabora.com>
>
> Currently, due to the inverse order, strcmp will produce negative result
> when the needle is towards the start of the haystack. Thus on the next
> iteration(s) we'll end up further towards the end and eventually fail to
> locate the entry.
>
> > Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
This still sucks because the dispatch table contains doubled "glX"
prefixes in a couple of places, so the table isn't actually sorted.
Also, open-coding a binary search is a sin.
Better patch sent.
- ajax
More information about the mesa-dev
mailing list