diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 18:11:36 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-11 18:14:14 -0800 |
commit | 10e1cdd54decacd78a2ea841cb1a206c67a735d5 (patch) | |
tree | 8be0283e041401c069c01463b2e071aff2b1f401 /xvidtune.c | |
parent | 1e9e2cd20ea446ed5ff83c605d49a8989790758a (diff) |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xvidtune.c')
-rw-r--r-- | xvidtune.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1579,15 +1579,19 @@ main (int argc, char** argv) if( (!strcmp(argv[1], "-timeout")) ) { TestTimeout = ((unsigned long) atol( argv[2] )) * 1000L; } - else + else { + fprintf(stderr, "Invalid number of arguments\n\n"); usage(1); + } } if (argc > 1) { int i = 0; - if (argc != 2) - usage(1); + if (argc != 2) { + fprintf(stderr, "Invalid number of arguments\n\n"); + usage(1); + } if (!strcmp(argv[1], "-show")) { if (!GetModeLine(XtDisplay (top), DefaultScreen (XtDisplay (top)))) { fprintf(stderr, "Unable to get mode info\n"); @@ -1604,8 +1608,10 @@ main (int argc, char** argv) CleanUp(XtDisplay (top)); XSync(XtDisplay (top), True); return 0; - } else - usage(1); + } else { + fprintf(stderr, "Unknown argument: %s\n\n", argv[1]); + usage(1); + } if (i != 0) { XF86VidModeSwitchMode(XtDisplay (top), DefaultScreen (XtDisplay (top)), i); |