diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:45:54 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-03-04 16:45:54 +0100 |
commit | 5460cc187513c48661d8b6b2bc0251c8900d44a0 (patch) | |
tree | 95d74b84fcebb00be0d53a49afb9fbe79120958a /fastwriter.c | |
parent | c0326277fc2ee0436621904c9f968a3312ae9c10 (diff) | |
download | fastwriter-5460cc187513c48661d8b6b2bc0251c8900d44a0.tar.gz fastwriter-5460cc187513c48661d8b6b2bc0251c8900d44a0.tar.bz2 fastwriter-5460cc187513c48661d8b6b2bc0251c8900d44a0.tar.xz fastwriter-5460cc187513c48661d8b6b2bc0251c8900d44a0.zip |
RPM support
Diffstat (limited to 'fastwriter.c')
-rw-r--r-- | fastwriter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fastwriter.c b/fastwriter.c index 08722fa..dd48493 100644 --- a/fastwriter.c +++ b/fastwriter.c @@ -64,8 +64,8 @@ int fastwriter_open(fastwriter_t *ctx, const char *name, fastwriter_flags_t flag break; case FASTWRITER_BUFFER_MAX: ctx->size = fastwriter_get_free_memory(); - - if ((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE) + + if ((ctx->size == (size_t)-1)||((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE)) ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE; else ctx->size -= FASTWRITER_RESERVE_MEMORY; |