]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use the cmp macro in fr_time_cmp
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 16 Apr 2021 18:39:41 +0000 (13:39 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 16 Apr 2021 18:40:07 +0000 (13:40 -0500)
src/lib/util/time.h

index 8abe6674e6f3ce78cbe3e24abe819f3d36735254..a58f01a40192556a6a86438abfbfc3d182e8f273 100644 (file)
@@ -315,7 +315,7 @@ static inline CC_HINT(nonnull) fr_time_t fr_time_from_timespec(struct timespec c
  */
 static inline int8_t fr_time_cmp(fr_time_t a, fr_time_t b)
 {
-       return (a > b) - (a < b);
+       return CMP(a, b);
 }
 
 /** Return a relative time since the server our_epoch