]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "Fix sign comparison"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 17 Feb 2021 15:48:01 +0000 (15:48 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 17 Feb 2021 15:48:01 +0000 (15:48 +0000)
This reverts commit 72fd3fbc45a2600a89be9a8eb9b7c472d6f27ea5.

src/modules/rlm_expiration/rlm_expiration.c

index 47d7fbbad3cc488514a01163cf472139dc8e9c61..f4ad919bb63c63ac6b7e83ee47928890a897ed45 100644 (file)
@@ -112,11 +112,11 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(rlm_rcode_t *p_result, UNU
  */
 static int expirecmp(UNUSED void *instance, request_t *req, UNUSED fr_pair_list_t *request_list, fr_pair_t *check)
 {
-       fr_unix_time_t now = 0;
+       time_t now = 0;
 
-       now = (fr_unix_time_t)((req) ? fr_time_to_sec(req->packet->timestamp) : time(NULL));
+       now = (req) ? fr_time_to_sec(req->packet->timestamp) : time(NULL);
 
-       if (now <= fr_unix_time_to_sec(check->vp_date)) return 0;
+       if (now <= (time_t) fr_unix_time_to_sec(check->vp_date)) return 0;
 
        return 1;
 }