diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-08-06 20:00:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-08-06 20:00:16 +0000 |
commit | 3ca2728eb2453633fbc6bd71763b59021e779223 (patch) | |
tree | 37b26f8cd73ae5df7ef2f2ede34317ba51d810cd /src/or/dirserv.c | |
parent | fb3e15b668359d9434461c8987e7f3c4e99d9221 (diff) | |
download | tor-3ca2728eb2453633fbc6bd71763b59021e779223.tar tor-3ca2728eb2453633fbc6bd71763b59021e779223.tar.gz |
(size_t)-1 is never < 0; fix an XXXX008 by changing the interface for dirserv_get_runningrouters
svn:r2165
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c2d3d8472..5aab93387 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -741,14 +741,14 @@ static int generate_runningrouters(crypto_pk_env_t *private_key) } /** Set *<b>rr</b> to the most recently generated encoded signed - * running-routers list, generating a new one as necessary. */ + * running-routers list, generating a new one as necessary. Return the + * size of the directory on success, and 0 on failure. */ size_t dirserv_get_runningrouters(const char **rr) -/* XXX008 Bug: size_t is unsigned, but we're returning -1 to mean error */ { if (runningrouters_is_dirty) { if(generate_runningrouters(get_identity_key())) { log_fn(LOG_ERR, "Couldn't generate running-routers list?"); - return -1; + return 0; } } *rr = runningrouters_string; |