Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
bench: fix use of fd after close
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Dec 26, 2011
1 parent d85c85a commit ed5bad7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmark/io.c
Expand Up @@ -51,7 +51,6 @@ static void writetest(int size, size_t bsize)
exit(254);
}
}
close(fd);

#ifndef NSYNC
# ifdef __linux__
Expand All @@ -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;
Expand Down

0 comments on commit ed5bad7

Please sign in to comment.