static void unlock_mtab(int mtablock)
{
if (mtablock >= 0) {
- lockf(mtablock, F_ULOCK, 0);
+ int trash0=lockf(mtablock, F_ULOCK, 0);
close(mtablock);
}
}
if (res == -1)
return -1;
- if (stat(mtab, &sbuf) == 0)
- chown(mtab_new, sbuf.st_uid, sbuf.st_gid);
+ if (stat(mtab, &sbuf) == 0) {
+ int trash0=chown(mtab_new, sbuf.st_uid, sbuf.st_gid);
+ }
res = rename(mtab_new, mtab);
if (res == -1) {
restore_privs();
if (currdir_fd != -1) {
- fchdir(currdir_fd);
+ int trash0=fchdir(currdir_fd);
close(currdir_fd);
}
if (mountpoint_fd != -1)