projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cfa6c2
)
[PATCH] blktrace: make write_data() return early with buflen == 0
author
Jens Axboe
<axboe@suse.de>
Thu, 2 Feb 2006 08:23:56 +0000
(09:23 +0100)
committer
Jens Axboe
<axboe@suse.de>
Thu, 2 Feb 2006 08:23:56 +0000
(09:23 +0100)
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index 024675b7b457ca22f378a80f44eaf37742ba562b..8601194586bcef68c64383dc23376b41eb6db96f 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-407,6
+407,9
@@
static int write_data(struct thread_information *tip,
{
int ret;
+ if (!buf_len)
+ return 0;
+
while (1) {
ret = fwrite(buf, buf_len, 1, tip->ofile);
if (ret == 1)