]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use get_datadir_fname() accessor in networkstatus.c
authorNick Mathewson <nickm@torproject.org>
Tue, 14 Nov 2017 21:10:12 +0000 (16:10 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 6 Dec 2017 00:49:28 +0000 (19:49 -0500)
src/or/networkstatus.c

index a7aa01f7879f2ec9d3070e8e431e8764081f6ed0..ff32476685735ef51e689cf4d5f72e62f5bd0e7b 100644 (file)
@@ -2260,7 +2260,6 @@ void
 networkstatus_dump_bridge_status_to_file(time_t now)
 {
   char *status = networkstatus_getinfo_by_purpose("bridge", now);
-  const or_options_t *options = get_options();
   char *fname = NULL;
   char *thresholds = NULL;
   char *published_thresholds_and_status = NULL;
@@ -2282,8 +2281,7 @@ networkstatus_dump_bridge_status_to_file(time_t now)
                "published %s\nflag-thresholds %s\n%s%s",
                published, thresholds, fingerprint_line ? fingerprint_line : "",
                status);
-  tor_asprintf(&fname, "%s"PATH_SEPARATOR"networkstatus-bridges",
-               options->DataDirectory);
+  fname = get_datadir_fname("networkstatus-bridges");
   write_str_to_file(fname,published_thresholds_and_status,0);
   tor_free(thresholds);
   tor_free(published_thresholds_and_status);