summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-08-26 23:12:13 +0000
committerNick Mathewson <nickm@torproject.org>2005-08-26 23:12:13 +0000
commitcd2bb915edd42715055b375b26aa6cf9a89f281f (patch)
tree4698a31e037986519e95f08a56f149b7b790bf1c /src/or
parent70fe2a6cee40b41d352c43b74da8d62763489316 (diff)
downloadtor-cd2bb915edd42715055b375b26aa6cf9a89f281f.tar.gz
tor-cd2bb915edd42715055b375b26aa6cf9a89f281f.zip
Fix a warning, add an assert.
svn:r4875
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerlist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 2de146be4f..732120f689 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -857,9 +857,8 @@ router_mark_as_down(const char *digest)
* will either be inserted into the routerlist or freed. Returns 0 if the
* router was added; less than 0 if it was not.
*
- * If we're returning an error and <b>msg</b> is not NULL, then assign to
- * *<b>msg</b> a static string describing the reason for refusing the
- * routerinfo.
+ * If we're returning an error, then assign to *<b>msg</b> a static string
+ * describing the reason for refusing the routerinfo.
*
* If the return value is less than -1, there was a problem with the
* routerinfo. If the return value is equal to -1, then the routerinfo was
@@ -873,6 +872,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg)
int authdir = get_options()->AuthoritativeDir;
int authdir_verified = 0;
+ tor_assert(msg);
+
if (!routerlist) {
routerlist = tor_malloc_zero(sizeof(routerlist_t));
routerlist->routers = smartlist_create();
@@ -1064,7 +1065,7 @@ router_load_routerlist_from_directory(const char *s,
smartlist_t *changed = smartlist_create();
SMARTLIST_FOREACH(new_list->routers, routerinfo_t *, r,
{
- char *msg;
+ const char *msg;
if (router_add_to_routerlist(r,&msg)==0)
smartlist_add(changed, r);
});