diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-11-16 18:25:20 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-11-16 18:25:20 +0000 |
commit | 0fa698d84fc6f3f6b71ecb1a7b9acb8de7e0d16a (patch) | |
tree | 77457b4c398934f0895d4edbdeed80f4f1390d07 /src/or/routerlist.c | |
parent | b4a90cfb7fcbc2e621d08ef3993f7912a8b4867c (diff) | |
download | tor-0fa698d84fc6f3f6b71ecb1a7b9acb8de7e0d16a.tar.gz tor-0fa698d84fc6f3f6b71ecb1a7b9acb8de7e0d16a.zip |
apply sebastian's bug 867 fix: make routerset_equal() work as documented with NULL arguments
svn:r17287
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index a46f0fb675..48e66ed8db 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -5100,6 +5100,11 @@ routerset_to_string(const routerset_t *set) int routerset_equal(const routerset_t *old, const routerset_t *new) { + if (old == NULL && new == NULL) + return 1; + else if (old == NULL || new == NULL) + return 0; + if (smartlist_len(old->list) != smartlist_len(new->list)) return 0; |