xinstall: Check result of fchmod

This commit is contained in:
Michael Forney 2016-12-06 02:16:57 -08:00 committed by Laslo Hunhold
parent 5e4e6aeb3e
commit a8a9b3bae9
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ install(const char *s1, const char *s2, int depth)
}
concat(f1, s1, f2, s2);
fchmod(fileno(f2), mode);
if (fchmod(fileno(f2), mode) < 0)
eprintf("fchmod %s:", s2);
if (fclose(f2) == EOF)
eprintf("fclose %s:", s2);