On 01/06/2016 02:55 PM, Dylan Baker wrote:
>
>
> On Wed, Jan 6, 2016 at 1:30 PM, Emil Velikov <[email protected]
> <mailto:[email protected]>> wrote:
>
> On 5 January 2016 at 19:46, <[email protected]
> <mailto:[email protected]>> wrote:
> > From: Dylan Baker <[email protected]
> <mailto:[email protected]>>
> > +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.
Even though it's unpopular with C programmers, I prefer, like Dylan,
to use brackets everywhere. Programming in C is hard enough; deciding
when to use or not use brackets is another unneeded mental burden.
Also, I've encountered real bugs in driver code due to a missing
bracket.
I'm not entirely consistent, though. Sometimes I don't bracket when
I'm *gasp* feeling lazy.
_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle