intel/aubinator: Use int to store getopt_long flags.
authorRafael Antognolli <rafael.antognolli@intel.com>
Tue, 12 Jun 2018 19:18:19 +0000 (12:18 -0700)
committerRafael Antognolli <rafael.antognolli@intel.com>
Fri, 15 Jun 2018 16:03:10 +0000 (09:03 -0700)
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@intel.com>
src/intel/tools/aubinator.c

index 3120e82b22ef3ea348c4b9999350090d72388672..c8d79ae377d68285bd1e7d2cfa092a711e20d44a 100644 (file)
@@ -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;