touchpad: only log the touch state if we have something to log
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 15 Oct 2018 03:47:29 +0000 (13:47 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 15 Oct 2018 04:07:41 +0000 (14:07 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c

index 3e62a1c..12963eb 100644 (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