[Mesa-dev] [PATCH shader-db 2/3] run: introduce get_glsl_version() helper

Eric Engestrom eric.engestrom at imgtec.com
Mon Aug 21 17:19:53 UTC 2017


On Monday, 2017-08-21 18:09:01 +0100, Emil Velikov wrote:
> On 21 August 2017 at 14:33, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> > On Monday, 2017-08-21 11:27:20 +0100, Emil Velikov wrote:
> >> From: Emil Velikov <emil.velikov at collabora.com>
> >>
> >> Flesh the duplicated functionality to a helper.
> >> Use const char * + sscanf to keep the compiler happy.
> >
> > Can you explain why you replaced strtol() with sscanf() in the commit
> > message?
> >
> > Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> >
> How about the following. I don't mind bringing strtol back if people prefer so.

I don't have a preference, but the explanation was too short for me to
follow.

> 
> "strtol discards the const qualifier of the endptr string. One could
> workaround it by using a local variable yet, sscanf seems like a
> shorter way to achieve the goal."

Perfect, cheers :)

> 
> Thanks
> Emil


More information about the mesa-dev mailing list