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

[tor-commits] [tor/master] Replaced some leftover assert()s with tor_assert()s.



commit c852760b80c4b7e06d775bafdb1f386d0e8ced63
Author: George Kadianakis <desnacked@xxxxxxxxx>
Date:   Sat Sep 10 00:45:28 2011 +0200

    Replaced some leftover assert()s with tor_assert()s.
---
 src/or/circuitbuild.c |    2 +-
 src/or/transports.c   |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index fe57070..382016e 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -4640,7 +4640,7 @@ transport_create(const tor_addr_t *addr, uint16_t port,
 int
 transport_add(transport_t *t)
 {
-  assert(t);
+  tor_assert(t);
 
   if (transport_get_by_name(t->name)) { /* check for duplicate names */
     log_notice(LD_CONFIG, "More than one transports have '%s' as "
diff --git a/src/or/transports.c b/src/or/transports.c
index 21a3022..6255a56 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -174,8 +174,7 @@ pt_configure_remaining_proxies(void)
   log_warn(LD_CONFIG, "We start configuring remaining managed proxies!");
   SMARTLIST_FOREACH_BEGIN(unconfigured_proxy_list,  managed_proxy_t *, mp) {
     /* configured proxies shouldn't be in unconfigured_proxy_list. */
-    if (proxy_configuration_finished(mp))
-      assert(0);
+    tor_assert(!proxy_configuration_finished(mp));
 
     configure_proxy(mp);
 
@@ -307,7 +306,7 @@ handle_finished_proxy(managed_proxy_t *mp)
   default:
     log_warn(LD_CONFIG, "Unfinished managed proxy in "
              "handle_finished_proxy().");
-    assert(0);
+    tor_assert(0);
   }
 
   tor_assert(smartlist_len(unconfigured_proxy_list) >= 0);



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