Browse Source

Exit when invalid parameter is given.

Georgi Chorbadzhiyski 9 years ago
parent
commit
27b93c7db5
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      videohubctrl.c

+ 2
- 0
videohubctrl.c View File

@@ -70,6 +70,8 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
70 70
 	// Set defaults
71 71
 	data->dev_port = "9990";
72 72
 	while ((j = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) {
73
+		if (j == '?') // Invalid parameter
74
+			exit(EXIT_FAILURE);
73 75
 		switch (j) {
74 76
 			case 'h': // --host
75 77
 				data->dev_host = optarg;

Loading…
Cancel
Save