summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-04-23 22:06:19 -0700
committerVinson Lee <vlee@vmware.com>2010-04-23 22:06:19 -0700
commitc3c920ee2c0ae46e88554c9351f22455f8e8a623 (patch)
tree29fb82501772bb2e580ed3644b98f4724c9bf09d /src/gallium/auxiliary
parent4ff354f281cfe663ef66e26af22e47400c15336f (diff)
gallium: In option helpers, move assignment outside of if clause.
This silences Coverity assign_where_compare_meant warnings.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_debug.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index ec3371a9b2..e8ff2773e6 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -309,8 +309,10 @@ debug_get_option_ ## sufix (void) \
{ \
static boolean first = TRUE; \
static boolean value; \
- if (first && !(first = FALSE)) \
+ if (first) { \
+ first = FALSE; \
value = debug_get_bool_option(name, dfault); \
+ } \
return value; \
}
@@ -320,8 +322,10 @@ debug_get_option_ ## sufix (void) \
{ \
static boolean first = TRUE; \
static long value; \
- if (first && !(first = FALSE)) \
+ if (first) { \
+ first = FALSE; \
value = debug_get_num_option(name, dfault); \
+ } \
return value; \
}
@@ -331,8 +335,10 @@ debug_get_option_ ## sufix (void) \
{ \
static boolean first = TRUE; \
static unsigned long value; \
- if (first && !(first = FALSE)) \
+ if (first) { \
+ first = FALSE; \
value = debug_get_flags_option(name, flags, dfault); \
+ } \
return value; \
}