From 5d6f906bd789f40fb0c58398909cfb39d44d4456 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Thu, 24 Jan 2019 11:32:49 +0000 Subject: Use sway_log_errno instead of strerror --- sway/commands/output/background.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sway/commands/output') diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index affa04ea..f65904bb 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c @@ -1,5 +1,7 @@ -#define _POSIX_C_SOURCE 200809 +#define _POSIX_C_SOURCE 200809L #include +#include +#include #include #include #include @@ -112,8 +114,8 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { bool can_access = access(src, F_OK) != -1; if (!can_access) { - sway_log(SWAY_ERROR, "Unable to access background file '%s': %s", - src, strerror(errno)); + sway_log_errno(SWAY_ERROR, "Unable to access background file '%s'", + src); config_add_swaynag_warning("Unable to access background file '%s'", src); free(src); -- cgit v1.2.3