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':
|
case 'r':
|
||||||
num_relocs = atoi(optarg);
|
num_relocs = atoi(optarg);
|
||||||
if (num_relocs < 0)
|
|
||||||
num_relocs = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,9 +142,12 @@ int gem_interrupts_update(struct gem_interrupts *irqs)
|
|||||||
return irqs->error;
|
return irqs->error;
|
||||||
|
|
||||||
if (irqs->fd < 0) {
|
if (irqs->fd < 0) {
|
||||||
val = interrupts_read();
|
long long ret;
|
||||||
if (val < 0)
|
ret = interrupts_read();
|
||||||
|
if (ret < 0)
|
||||||
return irqs->error = ENODEV;
|
return irqs->error = ENODEV;
|
||||||
|
else
|
||||||
|
val = ret;
|
||||||
} else {
|
} else {
|
||||||
if (read(irqs->fd, &val, sizeof(val)) < 0)
|
if (read(irqs->fd, &val, sizeof(val)) < 0)
|
||||||
return irqs->error = errno;
|
return irqs->error = errno;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user