소스 검색

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;