summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-05-29 02:29:35 +0000
committerNick Mathewson <nickm@torproject.org>2008-05-29 02:29:35 +0000
commitac330d9ba72c2379372682216b329f384dbe30fe (patch)
tree35a3f7992afe4d4007d3aca45b2819bb70de2dbc /src/common
parent6e68c23de74e613fb06cb4412c854845e46bed43 (diff)
downloadtor-ac330d9ba72c2379372682216b329f384dbe30fe.tar.gz
tor-ac330d9ba72c2379372682216b329f384dbe30fe.zip
New code to implement proposal for local geoip stats. Only enabled with --enable-geoip-stats passed to configure.
svn:r14802
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 14bd323634..a048779872 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1559,7 +1559,6 @@ start_writing_to_file(const char *fname, int open_flags, int mode,
tor_assert((open_flags & (O_BINARY|O_TEXT)) != 0);
#endif
new_file->fd = -1;
- tempname_len = strlen(fname)+16;
tor_assert(tempname_len > strlen(fname)); /*check for overflow*/
new_file->filename = tor_strdup(fname);
if (open_flags & O_APPEND) {
@@ -1577,8 +1576,7 @@ start_writing_to_file(const char *fname, int open_flags, int mode,
new_file->rename_on_close = 1;
}
- if ((new_file->fd = open(open_name, open_flags, mode))
- < 0) {
+ if ((new_file->fd = open(open_name, open_flags, mode)) < 0) {
log(LOG_WARN, LD_FS, "Couldn't open \"%s\" (%s) for writing: %s",
open_name, fname, strerror(errno));
goto err;