瀏覽代碼

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 年之前
父節點
當前提交
5365b3aa9f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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++;
 	}