[or-cvs] r16538: {tor} asserting(s) is better than segfaulting if it turns out to b (tor/trunk/src/or)

weasel at seul.org weasel at seul.org
Thu Aug 14 12:37:14 UTC 2008


Author: weasel
Date: 2008-08-14 08:37:14 -0400 (Thu, 14 Aug 2008)
New Revision: 16538

Modified:
   tor/trunk/src/or/routerparse.c
Log:
asserting(s) is better than segfaulting if it turns out to be NULL later

Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2008-08-14 12:37:07 UTC (rev 16537)
+++ tor/trunk/src/or/routerparse.c	2008-08-14 12:37:14 UTC (rev 16538)
@@ -2093,6 +2093,7 @@
   struct in_addr in;
   int i, inorder, n_signatures = 0;
   memarea_t *area = NULL, *rs_area = NULL;
+  tor_assert(s);
 
   if (router_get_networkstatus_v3_hash(s, ns_digest)) {
     log_warn(LD_DIR, "Unable to compute digest of network-status");



More information about the tor-commits mailing list