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

@@ -67,7 +67,8 @@ get_pty(int *master, int *slave, char *name, size_t namesz, uid_t ttyuid)
if (openpty(master, slave, name, NULL, NULL) != 0)
return(0);
(void) chown(name, ttyuid, ttygid);
if (chown(name, ttyuid, ttygid) != 0)
return(0);
return(1);
}