From: Vinson Lee Date: Sat, 24 Apr 2010 05:06:19 +0000 (-0700) Subject: gallium: In option helpers, move assignment outside of if clause. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3c920ee2c0ae46e88554c9351f22455f8e8a623;p=mesa.git gallium: In option helpers, move assignment outside of if clause. This silences Coverity assign_where_compare_meant warnings. --- diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index ec3371a9b25..e8ff2773e69 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; \ }