diff options
Diffstat (limited to 'fastwriter.c')
-rw-r--r-- | fastwriter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fastwriter.c b/fastwriter.c index 529acd6..84ef022 100644 --- a/fastwriter.c +++ b/fastwriter.c @@ -57,7 +57,7 @@ int fastwriter_open(fastwriter_t *ctx, const char *name, fastwriter_flags_t flag ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE; break; case FASTWRITER_BUFFER_MAX: - ctx->size = get_free_memory(); + ctx->size = fastwriter_get_free_memory(); if ((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE) ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE; @@ -266,7 +266,6 @@ int fastwriter_push(fastwriter_t *ctx, size_t size, const void *data) { if (ctx->pos < ctx->tail) end = ctx->tail; else end = ctx->size; - part1 = end - ctx->pos; if (part1 < size) { |