summaryrefslogtreecommitdiff
path: root/xvidtune.c
diff options
context:
space:
mode:
Diffstat (limited to 'xvidtune.c')
-rw-r--r--xvidtune.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/xvidtune.c b/xvidtune.c
index 85cd9ce..7005957 100644
--- a/xvidtune.c
+++ b/xvidtune.c
@@ -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);