Ignore:
Timestamp:
11/27/18 10:18:20 (2 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
b6ff245
Parents:
88b9798
Message:

And more..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/data-struct/ring_buffer.c

    ree6e802 r0a474e3  
    269269        size_t i = 0;
    270270       
    271         assert(min_nb_buffers <= nb_buffers);
     271        /*assert(min_nb_buffers <= nb_buffers);*/
     272        if (min_nb_buffers > nb_buffers) {
     273                fprintf(stderr, "min_nb_buffers must be greater than or equal to nb_buffers in libtrace_ringbuffer_write_bulk()\n");
     274                return ~0U;
     275        }
    272276        if (!min_nb_buffers && libtrace_ringbuffer_is_full(rb))
    273277                return 0;
     
    346350        size_t nb_ready;
    347351        size_t i = 0;
    348        
    349         assert(min_nb_buffers <= nb_buffers);
     352
     353        /*assert(min_nb_buffers <= nb_buffers);*/
     354        if (min_nb_buffers > nb_buffers) {
     355                fprintf(stderr, "min_nb_buffers must be greater than or equal to nb_buffers in libtrace_ringbuffer_write_bulk()\n");
     356                return ~0U;
     357        }
    350358
    351359        if (!min_nb_buffers && libtrace_ringbuffer_is_empty(rb))
Note: See TracChangeset for help on using the changeset viewer.