ソースを参照

explain the user what actually went wrong, rather that returning a few dozen lines coming from the strcmp inlined implementation...

Samuel Thibault 12 年 前
コミット
f3118a933b
共有1 個のファイルを変更した4 個の追加1 個の削除を含む
  1. 4 1
      include/starpu_util.h

+ 4 - 1
include/starpu_util.h

@@ -211,7 +211,10 @@ static __inline int starpu_get_env_number(const char *str)
 		char *check;
 
 		val = (int)strtol(strval, &check, 10);
-		STARPU_ASSERT(strcmp(check, "\0") == 0);
+		if (*check) {
+			fprintf(stderr,"The %s environment variable must contain an integer\n", str);
+			STARPU_ABORT();
+		}
 
 		/* fprintf(stderr, "ENV %s WAS %d\n", str, val); */
 		return val;