[tor-commits] [tor/master] timeval.h: Coccinelle cannot understand timercmp.

teor at torproject.org teor at torproject.org
Thu Oct 24 00:01:21 UTC 2019


commit 2695f7e68c23612804c9f74f33701eed4c949d70
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 9 12:51:56 2019 -0400

    timeval.h: Coccinelle cannot understand timercmp.
---
 src/lib/wallclock/timeval.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/wallclock/timeval.h b/src/lib/wallclock/timeval.h
index e632d04a0..897a86441 100644
--- a/src/lib/wallclock/timeval.h
+++ b/src/lib/wallclock/timeval.h
@@ -69,6 +69,7 @@
   } while (0)
 #endif /* !defined(timersub) */
 
+#ifndef COCCI
 #ifndef timercmp
 /** Replacement for timercmp on platforms that do not have it: returns true
  * iff the relational operator "op" makes the expression tv1 op tv2 true.
@@ -82,5 +83,6 @@
    ((tv1)->tv_usec op (tv2)->tv_usec) :         \
    ((tv1)->tv_sec op (tv2)->tv_sec))
 #endif /* !defined(timercmp) */
+#endif
 
 #endif /* !defined(TOR_TIMEVAL_H) */





More information about the tor-commits mailing list