asserting(s) is better than segfaulting if it turns out to be NULL later

svn:r16538
This commit is contained in:
Peter Palfrader 2008-08-14 12:37:14 +00:00
parent 1a2c6b41e3
commit b246c4de9b

View File

@ -2093,6 +2093,7 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
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");