]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from Coccinelle
authorNick Mathewson <nickm@torproject.org>
Wed, 9 Oct 2019 16:55:37 +0000 (12:55 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:32:13 +0000 (09:32 -0400)
src/lib/container/smartlist.h

index 25638e4b221a3f9acc727b5178f67b42fe8255eb..1dadf4ae6bba9e8bf0910928a8179499b9ebb345 100644 (file)
@@ -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) */