summaryrefslogtreecommitdiff
path: root/tests/testdisplay.c
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2013-10-10 12:23:19 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2013-10-11 13:16:07 +0100
commitce5becbb616637753e2c7e441c5e019f3864b3f7 (patch)
treee5c82cf2cd0f566201a635f27de7e829855ad9d4 /tests/testdisplay.c
parentffdece38e2b6aec64b0d96e83cd2324c035b1867 (diff)
testdisplay: Allow getopt to print error messages
By not assigning opterr, getopt will print its own error message that includes information about whether an option is unknown or just requires an additional argument. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r--tests/testdisplay.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 0fcce192..a0f43e98 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -723,7 +723,6 @@ int main(int argc, char **argv)
enter_exec_path( argv );
- opterr = 0;
while ((c = getopt(argc, argv, optstr)) != -1) {
switch (c) {
case '3':
@@ -771,7 +770,6 @@ int main(int argc, char **argv)
sscanf(optarg, "%d,%d", &specified_disp_id, &specified_mode_num);
break;
default:
- fprintf(stderr, "unknown option %c\n", c);
/* fall through */
case 'h':
usage(argv[0]);