/alps/fastwriter

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/fastwriter

« back to all changes in this revision

Viewing changes to fastwriter.c

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-04 15:45:54 UTC
  • Revision ID: csa@suren.me-20160304154554-na5g6icyed8p296p
RPM support

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        break;
65
65
     case FASTWRITER_BUFFER_MAX:
66
66
        ctx->size = fastwriter_get_free_memory();
67
 
 
68
 
        if ((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE)
 
67
        
 
68
        if ((ctx->size == (size_t)-1)||((ctx->size - FASTWRITER_RESERVE_MEMORY) < FASTWRITER_DEFAULT_BUFFER_SIZE))
69
69
            ctx->size = FASTWRITER_DEFAULT_BUFFER_SIZE;
70
70
        else
71
71
            ctx->size -= FASTWRITER_RESERVE_MEMORY;