Mesa (master): glsl_compiler: Use no_argument instead of 0 in getopt_long options
Ian Romanick
idr at kemper.freedesktop.org
Mon Oct 7 16:59:33 UTC 2013
Module: Mesa
Branch: master
Commit: 257db619c63a0474ea87749ed3e3fd681b3e58ea
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=257db619c63a0474ea87749ed3e3fd681b3e58ea
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Sep 9 10:06:59 2013 -0500
glsl_compiler: Use no_argument instead of 0 in getopt_long options
The choices aren't just 0 and 1, so using the enum names is much more
clear.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/main.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 57bec44..bc15835 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -110,11 +110,11 @@ int dump_lir = 0;
int do_link = 0;
const struct option compiler_opts[] = {
- { "glsl-es", 0, &glsl_es, 1 },
- { "dump-ast", 0, &dump_ast, 1 },
- { "dump-hir", 0, &dump_hir, 1 },
- { "dump-lir", 0, &dump_lir, 1 },
- { "link", 0, &do_link, 1 },
+ { "glsl-es", no_argument, &glsl_es, 1 },
+ { "dump-ast", no_argument, &dump_ast, 1 },
+ { "dump-hir", no_argument, &dump_hir, 1 },
+ { "dump-lir", no_argument, &dump_lir, 1 },
+ { "link", no_argument, &do_link, 1 },
{ NULL, 0, NULL, 0 }
};
More information about the mesa-commit
mailing list