bench: fix use of fd after close

pull/5370/head
Ben Noordhuis 2011-12-26 03:23:34 +01:00
parent d85c85aac1
commit ed5bad754c
1 changed files with 2 additions and 1 deletions

View File

@ -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;