瀏覽代碼

src/core/sched_policy.c: detect end of list

Nathalie Furmento 12 年之前
父節點
當前提交
5bdcaa3ed5
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/core/sched_policy.c

+ 1 - 0
src/core/sched_policy.c

@@ -126,6 +126,7 @@ static void display_sched_help_message(void)
 		{
 			struct starpu_sched_policy *p;
 			p = predefined_policies[i];
+			if (p == NULL) continue; // We reached the end of the array
 			fprintf(stderr, "%s\t-> %s\n", p->policy_name, p->policy_description);
 		}
 	 }