<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 1:30 PM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 5 January 2016 at 19:46, <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>> wrote:<br>
> From: Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>><br>
><br>
> Pull these out into helper functions, this change will be used in a<br>
> following patch to add a JSON printer.<br>
><br>
> Signed-off-by: Dylan Baker <<a href="mailto:dylanx.c.baker@intel.com">dylanx.c.baker@intel.com</a>><br>
><br>
> v2: - change "const char * name" to "const char *name" (Frank)<br>
> ---<br>
> src/utils/wflinfo.c | 50 ++++++++++++++++++++++++++++++++++++--------------<br>
> 1 file changed, 36 insertions(+), 14 deletions(-)<br>
><br>
> diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c<br>
> index 4b92222..8ee95c6 100644<br>
> --- a/src/utils/wflinfo.c<br>
> +++ b/src/utils/wflinfo.c<br>
> @@ -460,6 +460,39 @@ parse_version(const char *version)<br>
> return (major * 10) + minor;<br>
> }<br>
><br>
> +static const char *<br>
> +get_vendor(void)<br>
> +{<br>
> + const char *vendor = (const char *) glGetString(GL_VENDOR);<br>
> + if (glGetError() != GL_NO_ERROR || vendor == NULL) {<br>
> + vendor = "WFLINFO_GL_ERROR";<br>
> + }<br>
> +<br>
</span>Wish I caught you before re-spinning things. This and the other two<br>
can loose the brackets - those were added due to bugs in MSVC's C99<br>
parser. This comment is another "if things ever get to v3".<br>
<span class="HOEnZb"><font color="#888888"><br>
-Emil<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">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.<br></div></div>