projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c0fedb
)
grab_client: Error out if given an invalid grab mode
author
Andre
<maan@p133.(none)>
Tue, 2 May 2006 14:58:32 +0000
(16:58 +0200)
committer
Andre
<maan@p133.(none)>
Tue, 2 May 2006 14:58:32 +0000
(16:58 +0200)
grab_client.c
patch
|
blob
|
history
diff --git
a/grab_client.c
b/grab_client.c
index ee07d875e085a591437465eca3ef330deddc2bc1..b58c456e89c3545e590439a96afdb8d2ad40a071 100644
(file)
--- a/
grab_client.c
+++ b/
grab_client.c
@@
-85,6
+85,7
@@
rewrite:
return ret;
}
+/* TODO: gengetopt can handle the grab client modes */
static int check_gc_args(struct grab_client *gc)
{
int i;
@@
-95,6
+96,8
@@
static int check_gc_args(struct grab_client *gc)
for (i = 0; mv[i]; i++)
if (!strcmp(conf->mode_arg, mv[i]))
break;
+ if (!mv[i])
+ return -E_GC_SYNTAX;
gc->mode = i;
if (conf->audio_format_given) {
gc->audio_format_num = get_audio_format_num(conf->audio_format_arg);