explicitly ignore unused return value

fixes issue#1182
This commit is contained in:
Tomáš Čech 2017-04-19 10:15:11 +02:00
parent 94ad169eb6
commit 974be01e83
No known key found for this signature in database
GPG Key ID: 4A23E34FA033436D
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}