touchpad: only log the touch state if we have something to log

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-10-15 13:47:29 +10:00
parent 2bf3d57fe0
commit 782bbdb231

View file

@ -1926,7 +1926,8 @@ tp_debug_touch_state(struct tp_dispatch *tp,
t->pressure,
tp_touch_active(tp, t) ? "" : "inactive");
}
evdev_log_debug(device, "touch state: %s\n", buf);
if (buf[0] != '\0')
evdev_log_debug(device, "touch state: %s\n", buf);
}
static void