tools/record: compress a set of printfs into one
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Sep 2020 02:31:29 +0000 (12:31 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Sep 2020 02:38:53 +0000 (12:38 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-record.c

index 7efb0f6..ecbf6e4 100644 (file)
@@ -1997,10 +1997,9 @@ select_device(void)
        free(namelist);
 
        if (available_devices == 0) {
-               fprintf(stderr, "No devices available. ");
-               if (has_eaccess)
-                               fprintf(stderr, "Please re-run as root.");
-               fprintf(stderr, "\n");
+               fprintf(stderr,
+                       "No devices available.%s\n",
+                       has_eaccess ? " Please re-run as root." : "");
                return NULL;
        }