[waffle] [PATCH 32/33] utils/wflinfo: wrap if (glHamSandwich() != GL_NO_ERROR ||...) is curly brackets

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 7 10:28:39 PDT 2014


... as msvc preprocessor trips over itself and fails.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/utils/wflinfo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 94ecfea..9543918 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -535,16 +535,19 @@ print_wflinfo(const struct options *opts)
     }
 
     const char *vendor = (const char *) glGetString(GL_VENDOR);
-    if (glGetError() != GL_NO_ERROR || vendor == NULL)
+    if (glGetError() != GL_NO_ERROR || vendor == NULL) {
         vendor = "WFLINFO_GL_ERROR";
+    }
 
     const char *renderer = (const char *) glGetString(GL_RENDERER);
-    if (glGetError() != GL_NO_ERROR || renderer == NULL)
+    if (glGetError() != GL_NO_ERROR || renderer == NULL) {
         renderer = "WFLINFO_GL_ERROR";
+    }
 
     const char *version_str = (const char *) glGetString(GL_VERSION);
-    if (glGetError() != GL_NO_ERROR || version_str == NULL)
+    if (glGetError() != GL_NO_ERROR || version_str == NULL) {
         version_str = "WFLINFO_GL_ERROR";
+    }
 
     const char *platform = enum_map_to_str(platform_map, opts->platform);
     assert(platform != NULL);
-- 
2.0.0



More information about the waffle mailing list