mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 17:08:07 +02:00
tools: fix two scan-build errors in libinput-record
division by 0 and an unused variable Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d25aa301b1
commit
f1c0f28bca
1 changed files with 1 additions and 2 deletions
|
|
@ -405,7 +405,7 @@ print_description(struct record_context *ctx, struct libevdev *dev)
|
||||||
x = libevdev_get_abs_info(dev, ABS_X);
|
x = libevdev_get_abs_info(dev, ABS_X);
|
||||||
y = libevdev_get_abs_info(dev, ABS_Y);
|
y = libevdev_get_abs_info(dev, ABS_Y);
|
||||||
if (x && y) {
|
if (x && y) {
|
||||||
if (x->resolution || y->resolution) {
|
if (x->resolution && y->resolution) {
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
w = (x->maximum - x->minimum)/x->resolution;
|
w = (x->maximum - x->minimum)/x->resolution;
|
||||||
|
|
@ -788,7 +788,6 @@ mainloop(struct record_context *ctx)
|
||||||
indent_pop(ctx); /* events: */
|
indent_pop(ctx); /* events: */
|
||||||
|
|
||||||
if (autorestart) {
|
if (autorestart) {
|
||||||
d = list_first_entry(&ctx->devices, d, link);
|
|
||||||
noiprintf(ctx,
|
noiprintf(ctx,
|
||||||
"# Closing after %ds inactivity",
|
"# Closing after %ds inactivity",
|
||||||
ctx->timeout/1000);
|
ctx->timeout/1000);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue