* entry in the utmp file.
*/
if (access(_PATH_UTMP, R_OK|W_OK) == -1) {
- int fd = creat(_PATH_UTMP, 0664);
- close(fd);
+ close(creat(_PATH_UTMP, 0664));
}
utmpname(_PATH_UTMP);
setutent();
{
if (access(_PATH_WTMP, R_OK|W_OK) == -1) {
- int fd = creat(_PATH_WTMP, 0664);
- close(fd);
+ close(creat(_PATH_WTMP, 0664));
}
updwtmp(_PATH_WTMP, &ut);
}
pututline(&utent);
endutent();
if (access(_PATH_WTMP, R_OK|W_OK) == -1) {
- int fd = creat(_PATH_WTMP, 0664);
- close(fd);
+ close(creat(_PATH_WTMP, 0664));
}
updwtmp(_PATH_WTMP, &utent);
}