mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
kallsyms: change overflow variable to bool type
Change the 'overflow' variable to bool. Also, remove unnecessary parentheses. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
327df5bf54
commit
9a418218da
@ -455,17 +455,17 @@ static void write_src(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
long long offset;
|
long long offset;
|
||||||
int overflow;
|
bool overflow;
|
||||||
|
|
||||||
if (!absolute_percpu) {
|
if (!absolute_percpu) {
|
||||||
offset = table[i]->addr - relative_base;
|
offset = table[i]->addr - relative_base;
|
||||||
overflow = (offset < 0 || offset > UINT_MAX);
|
overflow = offset < 0 || offset > UINT_MAX;
|
||||||
} else if (symbol_absolute(table[i])) {
|
} else if (symbol_absolute(table[i])) {
|
||||||
offset = table[i]->addr;
|
offset = table[i]->addr;
|
||||||
overflow = (offset < 0 || offset > INT_MAX);
|
overflow = offset < 0 || offset > INT_MAX;
|
||||||
} else {
|
} else {
|
||||||
offset = relative_base - table[i]->addr - 1;
|
offset = relative_base - table[i]->addr - 1;
|
||||||
overflow = (offset < INT_MIN || offset >= 0);
|
overflow = offset < INT_MIN || offset >= 0;
|
||||||
}
|
}
|
||||||
if (overflow) {
|
if (overflow) {
|
||||||
fprintf(stderr, "kallsyms failure: "
|
fprintf(stderr, "kallsyms failure: "
|
||||||
|
Loading…
Reference in New Issue
Block a user