[waffle] [PATCH 4/6] wflinfo: Replace s/-1/WAFFLE_DONT_CARE/ when relevant
Chad Versace
chad.versace at linux.intel.com
Mon Apr 28 20:43:04 PDT 2014
This clarifies the code's intent.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
src/utils/wflinfo.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 7b762e7..e6fc444 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -297,7 +297,7 @@ parse_args(int argc, char *argv[], struct options *opts)
// Set options to default values.
opts->context_profile = WAFFLE_NONE;
- opts->context_version = -1;
+ opts->context_version = WAFFLE_DONT_CARE;
// prevent getopt_long from printing an error message
opterr = 0;
@@ -616,12 +616,12 @@ wflinfo_try_create_context(const struct options *opts,
config_attrib_list[i++] = WAFFLE_CONTEXT_API;
config_attrib_list[i++] = opts->context_api;
- if (opts->context_profile != -1) {
+ if (opts->context_profile != WAFFLE_DONT_CARE) {
config_attrib_list[i++] = WAFFLE_CONTEXT_PROFILE;
config_attrib_list[i++] = opts->context_profile;
}
- if (opts->context_version != -1) {
+ if (opts->context_version != WAFFLE_DONT_CARE) {
config_attrib_list[i++] = WAFFLE_CONTEXT_MAJOR_VERSION;
config_attrib_list[i++] = opts->context_version / 10;
config_attrib_list[i++] = WAFFLE_CONTEXT_MINOR_VERSION;
@@ -695,7 +695,7 @@ wflinfo_create_context(const struct options *opts,
{
if (opts->context_profile != WAFFLE_NONE &&
opts->context_api == WAFFLE_CONTEXT_OPENGL &&
- opts->context_version == -1) {
+ opts->context_version == WAFFLE_DONT_CARE) {
// If the user requested OpenGL and a CORE or COMPAT profile,
// but they didn't specify a version, then we'll try a set
--
1.9.0
More information about the waffle
mailing list