bar: xcb: check return values of ftruncate(), read() and write()

Fixes building with -D_FORTIFY_SOURCE=2
This commit is contained in:
Daniel Eklöf 2019-05-04 11:28:17 +02:00
parent b41255dbcc
commit 2450cbe7a6

View file

@ -311,7 +311,11 @@ loop(struct bar *_bar,
if (fds[1].revents & POLLHUP) {
LOG_WARN("disconnected from XCB");
write(_bar->abort_fd, &(uint64_t){1}, sizeof(uint64_t));
if (write(_bar->abort_fd, &(uint64_t){1}, sizeof(uint64_t))
!= sizeof(uint64_t))
{
LOG_ERRNO("failed to signal abort to modules");
}
break;
}