From 1303adbf1b7c82ca77716f3d2a1441b8539f8e41 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 Sep 2020 12:31:29 +1000 Subject: [PATCH] tools/record: compress a set of printfs into one Signed-off-by: Peter Hutterer --- tools/libinput-record.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 7efb0f6e..ecbf6e44 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -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; }