← Commit list

2205c84de

Eric Andersen
Eric Andersen
2003-09-15
FAILED Duration: 69s

Subject

comparison was always false due to limited range of data types. Carefully cast to unsigned long long prior to multiply to get the expected result.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

init/init.c+1 -1
@@ -333,7 +333,7 @@ static unsigned int check_free_memory(void)
s--;
}
result = (info.totalram >> s) + (info.totalswap >> s);
- if ((unsigned long long) (result * u) > UINT_MAX) {
+ if (((unsigned long long)result * (unsigned long long)u) > UINT_MAX) {
return(UINT_MAX);
} else {
return(result * u);