From f988f93b1a54ccbfabbf464514c526033f48e15c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 17 Oct 2007 16:55:44 +0000 Subject: r15877@catbus: nickm | 2007-10-17 12:54:56 -0400 Make unverified-consensus get removed when it is accepted or rejected. Make a new get_datadir_fname*() set of functions to eliminate the common code of "get the options, get the datadir, append some stuff". svn:r12000 --- src/or/hibernate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/or/hibernate.c') diff --git a/src/or/hibernate.c b/src/or/hibernate.c index e18989837..8fade846c 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -575,10 +575,9 @@ read_bandwidth_usage(void) or_state_t *state = get_or_state(); { - char fname[512]; - tor_snprintf(fname, sizeof(fname), "%s/bw_accounting", - get_options()->DataDirectory); + char *fname = get_datadir_fname("bw_accounting"); unlink(fname); + tor_free(fname); } if (!state) -- cgit v1.2.3