[Piglit] [PATCH 2/6] Use PIGLIT_STRIP_ARG() in formats.c
Paul Berry
stereotype441 at gmail.com
Wed Aug 7 13:28:39 PDT 2013
---
tests/spec/arb_texture_buffer_object/formats.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/tests/spec/arb_texture_buffer_object/formats.c b/tests/spec/arb_texture_buffer_object/formats.c
index 568951c..6e54b4e 100644
--- a/tests/spec/arb_texture_buffer_object/formats.c
+++ b/tests/spec/arb_texture_buffer_object/formats.c
@@ -702,26 +702,13 @@ piglit_init(int argc, char **argv)
init_programs();
}
-static bool
-find_arg(int argc, char *argv[], const char *str)
-{
- int i;
-
- for (i = 0; i < argc; i++) {
- if (strcmp(argv[i], str) == 0)
- return true;
- }
-
- return false;
-}
-
PIGLIT_GL_TEST_CONFIG_BEGIN
- test_vs = find_arg(argc, argv, "vs");
- if (!test_vs && !find_arg(argc, argv, "fs"))
+ test_vs = PIGLIT_STRIP_ARG("vs");
+ if (!test_vs && !PIGLIT_STRIP_ARG("fs"))
usage(argv[0]);
- test_arb = find_arg(argc, argv, "arb");
- if (!test_arb && !find_arg(argc, argv, "core"))
+ test_arb = PIGLIT_STRIP_ARG("arb");
+ if (!test_arb && !PIGLIT_STRIP_ARG("core"))
usage(argv[0]);
if (test_arb)
--
1.8.3.4
More information about the Piglit
mailing list