On Wed, Jan 6, 2016 at 1:30 PM, Emil Velikov <[email protected]> wrote:
> On 5 January 2016 at 19:46, <[email protected]> wrote: > > From: Dylan Baker <[email protected]> > > > > Pull these out into helper functions, this change will be used in a > > following patch to add a JSON printer. > > > > Signed-off-by: Dylan Baker <[email protected]> > > > > v2: - change "const char * name" to "const char *name" (Frank) > > --- > > src/utils/wflinfo.c | 50 > ++++++++++++++++++++++++++++++++++++-------------- > > 1 file changed, 36 insertions(+), 14 deletions(-) > > > > diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c > > index 4b92222..8ee95c6 100644 > > --- a/src/utils/wflinfo.c > > +++ b/src/utils/wflinfo.c > > @@ -460,6 +460,39 @@ parse_version(const char *version) > > return (major * 10) + minor; > > } > > > > +static const char * > > +get_vendor(void) > > +{ > > + const char *vendor = (const char *) glGetString(GL_VENDOR); > > + if (glGetError() != GL_NO_ERROR || vendor == NULL) { > > + vendor = "WFLINFO_GL_ERROR"; > > + } > > + > Wish I caught you before re-spinning things. This and the other two > can loose the brackets - those were added due to bugs in MSVC's C99 > parser. This comment is another "if things ever get to v3". > > -Emil > After learning GO I'm always going to use brackets, because being in a good habit of using brackets prevents an entire class of bugs (like apple's ssl return bug). Unless Chad really objects to having the brackets I prefer them.
_______________________________________________ waffle mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/waffle

