Selaa lähdekoodia

openmp: fix parsing of OMP_SCHEDULE in presence of chunksize

Make sure to only compare the schedule mode by using strncasecmp.
This fixes a parsing error with something like OMP_SCHEDULE=guided,5.
Samuel Pitoiset 9 vuotta sitten
vanhempi
commit
5365b3aa9f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/util/openmp_runtime_support_environment.c

+ 1 - 1
src/util/openmp_runtime_support_environment.c

@@ -79,7 +79,7 @@ static int strings_cmp(const char *strings[], const char *str)
 	int mode = 0;
 	while (strings[mode])
 	{
-		if (strcasecmp(str, strings[mode]) == 0)
+		if (strncasecmp(str, strings[mode], strlen(strings[mode])) == 0)
 			break;
 		mode++;
 	}