Permalink
Browse files

bench: fix use of fd after close

  • Loading branch information...
1 parent d85c85a commit ed5bad754c1ff5a4544ef8ac6f2eed0261a9aec7 @bnoordhuis bnoordhuis committed Dec 26, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 benchmark/io.c
View
@@ -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;

0 comments on commit ed5bad7

Please sign in to comment.