mirror of
https://github.com/irssi/irssi.git
synced 2026-08-13 05:32:11 +02:00
Check return values from some syscalls and warn if they fail
This commit is contained in:
parent
85d9fa1922
commit
dac67a567d
3 changed files with 14 additions and 5 deletions
|
|
@ -107,7 +107,9 @@ static int write_buffer_flush_rec(void *handlep, BUFFER_REC *rec)
|
|||
for (tmp = rec->blocks; tmp != NULL; tmp = tmp->next) {
|
||||
size = tmp->data != rec->active_block ? BUFFER_BLOCK_SIZE :
|
||||
rec->active_block_pos;
|
||||
write(handle, tmp->data, size);
|
||||
if (write(handle, tmp->data, size) != size) {
|
||||
g_warning("Failed to write(): %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
empty_blocks = g_slist_concat(empty_blocks, rec->blocks);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue