From 339f09405608ac5277fc0f43f459352967e7803d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 5 Sep 2008 21:19:53 +0000 Subject: Refactor some code and add some asserts based on scanner results. svn:r16783 --- src/or/directory.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/or/directory.c') diff --git a/src/or/directory.c b/src/or/directory.c index e7b37e4c1f..4f4d94af33 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -925,6 +925,7 @@ directory_send_command(dir_connection_t *conn, url = tor_strdup("/tor/running-routers"); break; case DIR_PURPOSE_FETCH_NETWORKSTATUS: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); @@ -962,12 +963,14 @@ directory_send_command(dir_connection_t *conn, url = tor_strdup("/tor/status-vote/next/consensus-signatures.z"); break; case DIR_PURPOSE_FETCH_SERVERDESC: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); tor_snprintf(url, len, "/tor/server/%s", resource); break; case DIR_PURPOSE_FETCH_EXTRAINFO: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); -- cgit v1.2.3-54-g00ecf