Clean up buf silliness.

This commit is contained in:
Ian Gulliver
2016-02-14 20:35:43 +00:00
parent d660117f7a
commit 93558c0a23
4 changed files with 31 additions and 34 deletions

View File

@@ -7,17 +7,6 @@
#include "common.h"
void buf_init(struct buf *buf, char *main, char *tmp) {
buf->buf = main;
buf->tmp = tmp;
buf->start = 0;
buf->length = 0;
}
void buf_alias(struct buf *to, struct buf *from) {
memcpy(to, from, sizeof(*to));
}
ssize_t buf_fill(struct buf *buf, int fd) {
if (buf->start + buf->length == BUF_LEN) {
assert(buf->start > 0);