Selaa lähdekoodia

try again to stop looping

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1127 f882894a-f735-0410-b71e-b25c423dba1c
Stanley Hopcroft 21 vuotta sitten
vanhempi
commit
93c1c1d845
1 muutettua tiedostoa jossa 3 lisäystä ja 6 poistoa
  1. 3 6
      plugins/check_ide_smart.c

+ 3 - 6
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;