summaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/login.c')
-rw-r--r--loginutils/login.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 4786d11..f3630f1 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -479,8 +479,7 @@ static void setutmp(const char *name, const char *line)
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);
}