diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-12-26 06:23:34 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-12-26 06:23:34 +0400 |
commit | ed5bad754c1ff5a4544ef8ac6f2eed0261a9aec7 (patch) | |
tree | 6e299ec9cbe1d718faeec601a2a69050f5a8b42e /benchmark | |
parent | d85c85aac1e2e87c0dbac7feddeb38f23da6d700 (diff) |
bench: fix use of fd after close
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/benchmark/io.c b/benchmark/io.c index 53a5231f023..a4f4575179f 100644 --- a/benchmark/io.c +++ b/benchmark/io.c @@ -51,7 +51,6 @@ static void writetest(int size, size_t bsize) exit(254); } } - close(fd); #ifndef NSYNC # ifdef __linux__ @@ -61,6 +60,8 @@ static void writetest(int size, size_t bsize) # endif #endif /* SYNC */ + close(fd); + end = now(); elapsed = (end - start) / 1e6; mbps = ((tsize/elapsed)) / 1048576; |