aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Čech <sleep_walker@gnu.org>2017-04-19 10:15:11 +0200
committerTomáš Čech <sleep_walker@gnu.org>2017-04-19 10:16:24 +0200
commit974be01e83a26b6c5989e2b45e20399f45b08826 (patch)
tree5cafe7fa61d0957068ad78ffe5cdaaa03cc0cd5e
parent94ad169eb6c2806c0f9a119b2c726d0f16cb56b0 (diff)
explicitly ignore unused return value
fixes issue#1182
-rw-r--r--sway/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index ae09d4f8..0014b33a 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -940,8 +940,8 @@ static void invoke_swaybar(struct bar_config *bar) {
if (!command) {
const char msg[] = "Unable to allocate swaybar command string";
int len = sizeof(msg);
- write(filedes[1], &len, sizeof(int));
- write(filedes[1], msg, len);
+ if (write(filedes[1], &len, sizeof(int))) {};
+ if (write(filedes[1], msg, len)) {};
close(filedes[1]);
_exit(EXIT_FAILURE);
}