Browse Source

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

Samuel Thibault 12 years ago
parent
commit
f3118a933b
1 changed files with 4 additions and 1 deletions
  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;