[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix a warning, add an assert.
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv14125/src/or
Modified Files:
routerlist.c
Log Message:
Fix a warning, add an assert.
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -d -r1.260 -r1.261
--- routerlist.c 26 Aug 2005 23:04:12 -0000 1.260
+++ routerlist.c 26 Aug 2005 23:12:13 -0000 1.261
@@ -857,9 +857,8 @@
* 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 @@
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 @@
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);
});