[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Move util_bug into libtor-log



commit bcf3e546d196910f53beb79814833c96f279e987
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Jun 22 11:54:38 2018 -0400

    Move util_bug into libtor-log
---
 src/common/address.h               | 2 +-
 src/common/include.am              | 2 --
 src/common/token_bucket.c          | 2 +-
 src/common/util.h                  | 2 +-
 src/lib/container/.may_include     | 2 +-
 src/lib/container/map.c            | 2 +-
 src/lib/container/order.c          | 2 +-
 src/lib/container/smartlist.c      | 2 +-
 src/lib/log/include.am             | 6 ++++--
 src/{common => lib/log}/util_bug.c | 4 ++--
 src/{common => lib/log}/util_bug.h | 0
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/common/address.h b/src/common/address.h
index 8abff072c..b95ee364a 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -15,7 +15,7 @@
 #include "orconfig.h"
 #include "lib/cc/torint.h"
 #include "common/compat.h"
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 #ifdef ADDRESS_PRIVATE
 
diff --git a/src/common/include.am b/src/common/include.am
index d4404fb1b..4927f5742 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -40,7 +40,6 @@ LIBOR_A_SRC = \
   src/common/confline.c					\
   src/common/memarea.c					\
   src/common/util.c					\
-  src/common/util_bug.c					\
   src/common/util_format.c				\
   src/common/util_process.c				\
   src/common/sandbox.c					\
@@ -94,7 +93,6 @@ COMMONHEADERS = \
   src/common/timers.h				\
   src/common/token_bucket.h			\
   src/common/util.h				\
-  src/common/util_bug.h				\
   src/common/util_format.h			\
   src/common/util_process.h			\
   src/common/workqueue.h
diff --git a/src/common/token_bucket.c b/src/common/token_bucket.c
index 502e8eac5..3a16720d7 100644
--- a/src/common/token_bucket.c
+++ b/src/common/token_bucket.c
@@ -20,7 +20,7 @@
 
 #include "common/token_bucket.h"
 #include "common/compat.h"
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 /**
  * Set the <b>rate</b> and <b>burst</b> value in a token_bucket_cfg.
diff --git a/src/common/util.h b/src/common/util.h
index 3f6476d75..d1b4e8fe9 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -32,7 +32,7 @@
 #include "lib/intmath/muldiv.h"
 #include "lib/intmath/cmp.h"
 #include "lib/log/ratelim.h"
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 #ifndef O_BINARY
 #define O_BINARY 0
diff --git a/src/lib/container/.may_include b/src/lib/container/.may_include
index 42458b295..1114ad845 100644
--- a/src/lib/container/.may_include
+++ b/src/lib/container/.may_include
@@ -13,4 +13,4 @@ ht.h
 siphash.h
 
 # XXX I'd like to remove this.
-common/util_bug.h
+lib/log/util_bug.h
diff --git a/src/lib/container/map.c b/src/lib/container/map.c
index ba59e37d6..5f280b316 100644
--- a/src/lib/container/map.c
+++ b/src/lib/container/map.c
@@ -17,7 +17,7 @@
 #include "lib/string/util_string.h"
 #include "lib/malloc/util_malloc.h"
 
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/lib/container/order.c b/src/lib/container/order.c
index 599f83300..4fdd51d99 100644
--- a/src/lib/container/order.c
+++ b/src/lib/container/order.c
@@ -14,7 +14,7 @@
 #include <stdlib.h>
 
 #include "lib/container/order.h"
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 /** Declare a function called <b>funcname</b> that acts as a find_nth_FOO
  * function for an array of type <b>elt_t</b>*.
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c
index 9d405085b..852a32810 100644
--- a/src/lib/container/smartlist.c
+++ b/src/lib/container/smartlist.c
@@ -21,7 +21,7 @@
 #include "lib/string/util_string.h"
 #include "lib/string/printf.h"
 
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/lib/log/include.am b/src/lib/log/include.am
index f9f327e2d..e3041ed78 100644
--- a/src/lib/log/include.am
+++ b/src/lib/log/include.am
@@ -7,7 +7,8 @@ endif
 
 src_lib_libtor_log_a_SOURCES =			\
 	src/lib/log/ratelim.c			\
-	src/lib/log/torlog.c
+	src/lib/log/torlog.c			\
+	src/lib/log/util_bug.c
 
 src_lib_libtor_log_testing_a_SOURCES = \
 	$(src_lib_libtor_log_a_SOURCES)
@@ -16,4 +17,5 @@ src_lib_libtor_log_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
 
 noinst_HEADERS +=					\
 	src/lib/log/ratelim.h				\
-	src/lib/log/torlog.h
+	src/lib/log/torlog.h				\
+	src/lib/log/util_bug.h
diff --git a/src/common/util_bug.c b/src/lib/log/util_bug.c
similarity index 98%
rename from src/common/util_bug.c
rename to src/lib/log/util_bug.c
index c68519b74..cdd862429 100644
--- a/src/common/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -8,7 +8,7 @@
  **/
 
 #include "orconfig.h"
-#include "common/util_bug.h"
+#include "lib/log/util_bug.h"
 #include "lib/log/torlog.h"
 #include "lib/err/backtrace.h"
 #ifdef TOR_UNIT_TESTS
@@ -41,7 +41,7 @@ tor_end_capture_bugs_(void)
     return;
   SMARTLIST_FOREACH(bug_messages, char *, cp, tor_free(cp));
   smartlist_free(bug_messages);
-nn  bug_messages = NULL;
+  bug_messages = NULL;
 }
 const smartlist_t *
 tor_get_captured_bug_log_(void)
diff --git a/src/common/util_bug.h b/src/lib/log/util_bug.h
similarity index 100%
rename from src/common/util_bug.h
rename to src/lib/log/util_bug.h



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits