diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/updwtmp.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/updwtmp.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/updwtmp.c b/sysdeps/unix/sysv/linux/updwtmp.c index 93fb454473..87791dc3a4 100644 --- a/sysdeps/unix/sysv/linux/updwtmp.c +++ b/sysdeps/unix/sysv/linux/updwtmp.c @@ -19,15 +19,19 @@ #include <string.h> #include <unistd.h> -#define TRANSFORM_UTMP_FILE_NAME(file_name) \ - ((strcmp (file_name, _PATH_UTMP) == 0 \ - && __access (_PATH_UTMP "x", F_OK) == 0) ? (_PATH_UTMP "x") : \ - ((strcmp (file_name, _PATH_WTMP) == 0 \ - && __access ( _PATH_WTMP "x", F_OK) == 0) ? (_PATH_WTMP "x") : \ - ((strcmp (file_name, _PATH_UTMP "x") == 0 \ - && __access (_PATH_UTMP "x", F_OK) != 0) ? _PATH_UTMP : \ - ((strcmp (file_name, _PATH_WTMP "x") == 0 \ - && __access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \ - file_name)))) +#define TRANSFORM_UTMP_FILE_NAME(file_name) \ + ((strcmp (file_name, _PATH_UTMP) == 0 \ + && __access (_PATH_UTMP "x", F_OK) == 0) \ + ? (_PATH_UTMP "x") \ + : ((strcmp (file_name, _PATH_WTMP) == 0 \ + && __access ( _PATH_WTMP "x", F_OK) == 0) \ + ? (_PATH_WTMP "x") \ + : ((strcmp (file_name, _PATH_UTMP "x") == 0 \ + && __access (_PATH_UTMP "x", F_OK) != 0) \ + ? _PATH_UTMP \ + : ((strcmp (file_name, _PATH_WTMP "x") == 0 \ + && __access (_PATH_WTMP "x", F_OK) != 0) \ + ? _PATH_WTMP \ + : file_name)))) #include <login/updwtmp.c> |