Commit 4172fec24ab193005cd66b1f7d7be531b1666159

Con Kolivas 2011-07-05T16:47:19

Cope with invalid parameter passing.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/main.c b/main.c
index 2dfbff5..1d44b9d 100644
--- a/main.c
+++ b/main.c
@@ -281,6 +281,7 @@ static struct option options[] = {
 	{ "vectors", 1, NULL, 'v' },
 	{ "worksize", 1, NULL, 'w' },
 	{ "userpass", 1, NULL, 'O' },
+	{0, 0, 0, 0}
 };
 
 static bool jobj_binary(const json_t *obj, const char *key,
@@ -1414,6 +1415,7 @@ static void parse_arg (int key, char *arg)
 	case 1004:
 		use_syslog = true;
 		break;
+	case '?':
 	default:
 		show_usage();
 	}