summaryrefslogtreecommitdiff
path: root/modules/pam_timestamp/pam_timestamp.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-03-18 21:53:06 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-03-18 21:53:06 +0000
commit8b7112d4f0ef82d02b1219374a25089848a3a8a3 (patch)
treeb66c4e1d9c506371c787c02ef1fcf1c837c46e3f /modules/pam_timestamp/pam_timestamp.c
parenta5d47d59cad4b5c3d1858884536e05a8e684f04d (diff)
modules/pam_timestamp: fix clang compilation warning
modules/pam_timestamp/pam_timestamp.c:807:17: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] } else if (!timestamp_good(st.st... ^ * modules/pam_timestamp/pam_timestamp.c (main): Change timestamp_good return code check to a more traditional form.
Diffstat (limited to 'modules/pam_timestamp/pam_timestamp.c')
-rw-r--r--modules/pam_timestamp/pam_timestamp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c
index 5da7575d..832aa629 100644
--- a/modules/pam_timestamp/pam_timestamp.c
+++ b/modules/pam_timestamp/pam_timestamp.c
@@ -799,8 +799,8 @@ main(int argc, char **argv)
/* Check oldest login against timestamp */
if (check_login_time(user, st.st_mtime) != PAM_SUCCESS) {
retval = 7;
- } else if (!timestamp_good(st.st_mtime, time(NULL),
- DEFAULT_TIMESTAMP_TIMEOUT) == PAM_SUCCESS) {
+ } else if (timestamp_good(st.st_mtime, time(NULL),
+ DEFAULT_TIMESTAMP_TIMEOUT) != PAM_SUCCESS) {
retval = 7;
}
} else {