mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
fix C89 and be tests
This commit is contained in:
1 parent
863aea34c4
commit
555c5a76be
3 files changed
+8
-7
No files matched your search
+1
-1
@@ -1433,9 +1433,9 @@ static size_t txq_next(struct connstate *s, uint8_t **buf) {
|
||||
}
|
||||
|
||||
static bool txq_add(struct connstate *s, const void *buf, size_t len) {
|
||||
assert(len > 0);
|
||||
uint32_t n = (uint32_t) len;
|
||||
size_t off = s->txq.len, total = sizeof(n) + len;
|
||||
assert(len > 0);
|
||||
if (mg_iobuf_add(&s->txq, off, NULL, total) != total) return false;
|
||||
memcpy(s->txq.buf + off, &n, sizeof(n));
|
||||
memcpy(s->txq.buf + off + sizeof(n), buf, len);
|
||||
|
||||
Reference in new issue
Block a user