aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ide_smart.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ide_smart.c')
-rw-r--r--plugins/check_ide_smart.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c
index bf123556..41724839 100644
--- a/plugins/check_ide_smart.c
+++ b/plugins/check_ide_smart.c
@@ -182,13 +182,10 @@ main (int argc, char *argv[])
o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
- switch (o) {
- case -1:
- /*
- * bail out of the switch but not the loop, so
- * that device can be extracted from argv.
- */
+ if (o == -1 || o == EOF || o == 1)
break;
+
+ switch (o) {
case 'd':
device = optarg;
break;