From: Victor Julien Date: Sat, 12 Oct 2024 04:59:37 +0000 (+0200) Subject: time: remove unused function X-Git-Tag: suricata-8.0.0-beta1~758 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdc0df845467e63e585b7e8b4a129cc5831c5ca7;p=thirdparty%2Fsuricata.git time: remove unused function It tripped up cppcheck: src/util-time.h:124:35: error: syntax error [syntaxError] return !timercmp(first, second, >); --- diff --git a/src/util-time.h b/src/util-time.h index a537a9a864..d2de7cb8db 100644 --- a/src/util-time.h +++ b/src/util-time.h @@ -115,15 +115,6 @@ SCTime_t TimeGet(void); /** \brief initialize a 'struct timespec' from a 'struct timeval'. */ #define FROM_TIMEVAL(timev) { .tv_sec = (timev).tv_sec, .tv_nsec = (timev).tv_usec * 1000 } -/** \brief compare two 'struct timeval' and return if the first is earlier than the second */ -static inline bool TimevalEarlier(struct timeval *first, struct timeval *second) -{ - /* from man timercmp on Linux: "Some systems (but not Linux/glibc), have a broken timercmp() - * implementation, in which CMP of >=, <=, and == do not work; portable applications can instead - * use ... !timercmp(..., >) */ - return !timercmp(first, second, >); -} - #ifndef timeradd #define timeradd(a, b, r) \ do { \