io-util: make flush_fd() return how many bytes where flushed
This is useful so that callers know whether anything at all and how much was flushed. This patches through users of this functions to ensure that the return values > 0 which may be returned now are not propagated in public APIs. Also, users that ignore the return value are changed to do so explicitly now.
This commit is contained in:
@@ -316,7 +316,7 @@ int ask_password_tty(
|
||||
}
|
||||
|
||||
if (notify >= 0 && pollfd[POLL_INOTIFY].revents != 0)
|
||||
flush_fd(notify);
|
||||
(void) flush_fd(notify);
|
||||
|
||||
if (pollfd[POLL_TTY].revents == 0)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user