mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 04:15:39 +02:00
bar: xcb: check return values of ftruncate(), read() and write()
Fixes building with -D_FORTIFY_SOURCE=2
This commit is contained in:
parent
b41255dbcc
commit
2450cbe7a6
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue