From aca6fb5f5f3875a9e51cef8c60a45750944e84eb Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 16 Oct 2005 19:47:01 +0000 Subject: cut out a warning that doesn't need to warn svn:r5252 --- src/or/main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/or/main.c') diff --git a/src/or/main.c b/src/or/main.c index 8d32cd80f..b61b23478 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -983,15 +983,13 @@ do_hup(void) /* Write out a fresh descriptor, but leave old one on failure. */ router_rebuild_descriptor(1); descriptor = router_get_my_descriptor(); - if (!descriptor) { - log_fn(LOG_WARN,"No descriptor to save."); - return 0; - } - tor_snprintf(keydir,sizeof(keydir),"%s/router.desc", - options->DataDirectory); - log_fn(LOG_INFO,"Saving descriptor to \"%s\"...",keydir); - if (write_str_to_file(keydir, descriptor, 0)) { - return 0; + if (descriptor) { + tor_snprintf(keydir,sizeof(keydir),"%s/router.desc", + options->DataDirectory); + log_fn(LOG_INFO,"Saving descriptor to \"%s\"...",keydir); + if (write_str_to_file(keydir, descriptor, 0)) { + return 0; + } } } return 0; -- cgit v1.2.3