Mesa (master): intel/aubinator: Use int to store getopt_long flags.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 15 16:04:18 UTC 2018


Module: Mesa
Branch: master
Commit: 9e1f208795b62ad4825aaafd5b740c979bb67048
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e1f208795b62ad4825aaafd5b740c979bb67048

Author: Rafael Antognolli <rafael.antognolli at intel.com>
Date:   Tue Jun 12 12:18:19 2018 -0700

intel/aubinator: Use int to store getopt_long flags.

getopt_long flag parameter is an int pointer, so if we use bool to store
those values, when getopt_long writes to one of them, it might end up
overwriting the next one.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/intel/tools/aubinator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index 3120e82b22..c8d79ae377 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -56,8 +56,8 @@
 
 /* options */
 
-static bool option_full_decode = true;
-static bool option_print_offsets = true;
+static int option_full_decode = true;
+static int option_print_offsets = true;
 static int max_vbo_lines = -1;
 static enum { COLOR_AUTO, COLOR_ALWAYS, COLOR_NEVER } option_color;
 




More information about the mesa-commit mailing list