Quiet gcc warnings on glibc systems that use warn_unused_result for

write(2) and others.
This commit is contained in:
Todd C. Miller
2010-08-03 11:17:56 -04:00
parent 1229406720
commit 420db23714
7 changed files with 52 additions and 24 deletions

View File

@@ -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 {