Quiet gcc warnings on glibc systems that use warn_unused_result for
write(2) and others.
This commit is contained in:
@@ -216,7 +216,8 @@ update_timestamp(char *timestampdir, char *timestampfile)
|
||||
log_error(NO_EXIT|USE_ERRNO, "Can't open %s", timestampfile);
|
||||
else {
|
||||
lock_file(fd, SUDO_LOCK);
|
||||
write(fd, &tty_info, sizeof(tty_info));
|
||||
if (write(fd, &tty_info, sizeof(tty_info)) != sizeof(tty_info))
|
||||
log_error(NO_EXIT|USE_ERRNO, "Can't write %s", timestampfile);
|
||||
close(fd);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user