From 93c1c1d84517f1d11a91636c4e045c9f2e8e279a Mon Sep 17 00:00:00 2001 From: Stanley Hopcroft Date: Wed, 2 Feb 2005 06:42:18 +0000 Subject: try again to stop looping git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1127 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c index bf12355..4172483 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; -- cgit v0.10-9-g596f