mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-26 09:16:34 +00:00
Fix comparison of unsigned integers
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
52a393a311
commit
2643793255
@ -249,8 +249,6 @@ int main(int argc, char **argv)
|
||||
|
||||
case 'r':
|
||||
num_relocs = atoi(optarg);
|
||||
if (num_relocs < 0)
|
||||
num_relocs = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -142,9 +142,12 @@ int gem_interrupts_update(struct gem_interrupts *irqs)
|
||||
return irqs->error;
|
||||
|
||||
if (irqs->fd < 0) {
|
||||
val = interrupts_read();
|
||||
if (val < 0)
|
||||
long long ret;
|
||||
ret = interrupts_read();
|
||||
if (ret < 0)
|
||||
return irqs->error = ENODEV;
|
||||
else
|
||||
val = ret;
|
||||
} else {
|
||||
if (read(irqs->fd, &val, sizeof(val)) < 0)
|
||||
return irqs->error = errno;
|
||||
|
Loading…
x
Reference in New Issue
Block a user