]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Move ARRAY_LENGTH to compiler_compat.h
authorNick Mathewson <nickm@torproject.org>
Fri, 22 Jun 2018 12:41:57 +0000 (08:41 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 22 Jun 2018 13:49:13 +0000 (09:49 -0400)
src/common/util.h
src/lib/cc/compat_compiler.h

index f2df84b194eff5ec163d1cb45bc31e352f70f71c..8977b460bf095df5953d55a84fa953e5725ecb5f 100644 (file)
@@ -451,6 +451,4 @@ STATIC int format_helper_exit_status(unsigned char child_state,
 
 #endif /* defined(UTIL_PRIVATE) */
 
-#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
-
 #endif /* !defined(TOR_UTIL_H) */
index 763c3d06d53372bf9058b9fb5e3a88f69a3ca95d..67d945cfaf6c9ccb5382a36e170093da26bf9520 100644 (file)
  */
 #define STRUCT_VAR_P(st, off) ((void*) ( ((char*)(st)) + (off) ) )
 
+/** Macro: Yields the number of elements in array x. */
+#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
+
 #endif /* !defined(TOR_COMPAT_H) */