Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b97cd36
)
lib: Fixed some bufio bugs.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 26 Apr 2016 03:21:33 +0000
(
05:21
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 26 Apr 2016 03:21:33 +0000
(
05:21
+0200)
lib/bufio.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/bufio.c
b/lib/bufio.c
index
4f2ad10
..
83963b3
100644
(file)
--- a/
lib/bufio.c
+++ b/
lib/bufio.c
@@
-228,6
+228,7
@@
ssize_t biowrite(struct bufio *bio, const void *data, size_t len)
}
if(len < bio->wbuf.s - bio->wbuf.d) {
memcpy(bio->wbuf.b + bio->wbuf.d, data, len);
+ bio->wbuf.d += len;
wb += len;
len = 0;
} else {
@@
-247,7
+248,7
@@
ssize_t biowrite(struct bufio *bio, const void *data, size_t len)
data += ret; len -= ret; wb += ret;
}
}
- return(
0
);
+ return(
wb
);
}
ssize_t biowritesome(struct bufio *bio, const void *data, size_t len)