aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2014-04-28 18:09:08 -0700
committerChad Versace <chad.versace@linux.intel.com>2014-05-08 21:15:12 -0700
commit1775a750b481845d22264454a3810771756e276b (patch)
treedffe11dd5d5714c085a158b8130534e684aedfba /src
parent95dcbb923a0204750c63c65e683d4dc36cc93154 (diff)
downloadwaffle-1775a750b481845d22264454a3810771756e276b.tar.gz
wflinfo: Replace s/-1/WAFFLE_DONT_CARE/ when relevant
This clarifies the code's intent. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/utils/wflinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 6fbba70..fb28a35 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