diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-11-22 12:16:17 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-11-22 12:16:17 -0500 |
commit | 6f7eb7a0a535a287fdb838d83e7ff9c7aac6fd6c (patch) | |
tree | aff877906fed60f2bdcf92a49d141abd35d30824 /src | |
parent | 6cbd17470d383616c3b34310ad5716a7c8c8990a (diff) | |
download | tor-6f7eb7a0a535a287fdb838d83e7ff9c7aac6fd6c.tar.gz tor-6f7eb7a0a535a287fdb838d83e7ff9c7aac6fd6c.zip |
Remove needless fd var from test. CID 1130989.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_util.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index ab5928ffd4..376e3aab8e 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -112,7 +112,6 @@ test_util_write_chunks_to_file(void *arg) char *tempname = NULL; char *str = NULL; int r; - int fd = -1; struct stat st; /* These should be two different sizes to ensure the data is different @@ -155,7 +154,6 @@ test_util_write_chunks_to_file(void *arg) tt_int_op(st.st_size, ==, data_str_len); test_mem_op(data_str, ==, str, data_str_len); tor_free(str); - close(fd); // assert that the tempfile is removed (should not leave artifacts) str = read_file_to_str(tempname, RFTS_BIN|RFTS_IGNORE_MISSING, &st); @@ -187,7 +185,6 @@ test_util_write_chunks_to_file(void *arg) tt_int_op(st.st_size, ==, data_str_len); test_mem_op(data_str, ==, str, data_str_len); tor_free(str); - close(fd); // assert the tempfile still contains the known string str = read_file_to_str(tempname, RFTS_BIN, &st); @@ -204,8 +201,6 @@ test_util_write_chunks_to_file(void *arg) tor_free(str); tor_free(data_str); tor_free(temp_str); - if (fd >= 0) - close(fd); } static void |