diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-27 06:37:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-27 06:37:34 +0000 |
commit | 44d4516155309e15b3463a543aef6239d485a04e (patch) | |
tree | 0bf498a321c230f9fc777a307d94a9f5476f1aa8 /src/or/dirserv.c | |
parent | 1aaedcb17159bbf724a56ae9e977504a68f0b8c9 (diff) | |
download | tor-44d4516155309e15b3463a543aef6239d485a04e.tar.gz tor-44d4516155309e15b3463a543aef6239d485a04e.zip |
Use tor_snprintf, not snprintf
svn:r2609
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index f108178464..06d1a5a81d 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -616,7 +616,7 @@ dirserv_dump_directory_to_string(char *s, size_t maxlen, dirserv_remove_old_servers(ROUTER_MAX_AGE); published_on = time(NULL); format_iso_time(published, published_on); - snprintf(s, maxlen, + tor_snprintf(s, maxlen, "signed-directory\n" "published %s\n" "recommended-software %s\n" @@ -711,7 +711,7 @@ void dirserv_set_cached_directory(const char *directory, time_t when) } cached_directory_published = when; if(get_data_directory(&options)) { - snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory(&options)); + tor_snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory(&options)); if(write_str_to_file(filename,cached_directory,0) < 0) { log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring."); } @@ -783,7 +783,7 @@ static int dirserv_regenerate_directory(void) } tor_free(new_directory); if(get_data_directory(&options)) { - snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory(&options)); + tor_snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory(&options)); if(write_str_to_file(filename,the_directory,0) < 0) { log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring."); } @@ -833,7 +833,7 @@ static int generate_runningrouters(crypto_pk_env_t *private_key) #endif published_on = time(NULL); format_iso_time(published, published_on); - snprintf(s, len, "network-status\n" + tor_snprintf(s, len, "network-status\n" "published %s\n" "router-status %s\n" "opt dir-signing-key %s\n" |