[tor-commits] [tor/master] smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from Coccinelle

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


commit 41f44d87604c8b780e9c3a1e60f006633e0a6d1b
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 9 12:55:37 2019 -0400

    smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from Coccinelle
---
 src/lib/container/smartlist.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h
index 25638e4b2..1dadf4ae6 100644
--- a/src/lib/container/smartlist.h
+++ b/src/lib/container/smartlist.h
@@ -92,6 +92,7 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
                               size_t join_len, int terminate, size_t *len_out)
   ATTR_MALLOC;
 
+#ifndef COCCI
 /* Helper: Given two lists of items, possibly of different types, such that
  * both lists are sorted on some common field (as determined by a comparison
  * expression <b>cmpexpr</b>), and such that one list (<b>sl1</b>) has no
@@ -165,5 +166,6 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
 #define SMARTLIST_FOREACH_JOIN_END(var1, var2)  \
   }                                             \
   STMT_END
+#endif
 
 #endif /* !defined(TOR_SMARTLIST_H) */





More information about the tor-commits mailing list