Ignore:
Timestamp:
04/10/14 01:24:05 (8 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
df668eb
Parents:
fb1fd42
Message:

Use size_t rather than int for the data structures. Export vector, deque and ring_buffer for testing and use in programs.
Remove some inlines for now since these result in lots of compile warnings when also exported, the compiler is probably smart enough anyway.

File:
1 edited

Legend:

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

    rd6a56b6 read9478  
    1414 *                              NOTE: this mainly applies to the blocking functions
    1515 */
    16 inline void libtrace_slidingwindow_init(libtrace_slidingwindow_t *sw, int size, uint64_t start_number) {
     16inline void libtrace_slidingwindow_init(libtrace_slidingwindow_t *sw, size_t size, uint64_t start_number) {
    1717        sw->size = size; // All of this size can be used
    1818        sw->start = 0;
    1919        sw->elements = calloc(sw->size, sizeof(void*));
    2020        assert(sw->elements);
    21         memset(sw->elements, 0, sizeof(void*) * sw->size);
     21        memset((void *) sw->elements, 0, sizeof(void*) * sw->size);
    2222        sw->start_number = start_number;
    2323}
Note: See TracChangeset for help on using the changeset viewer.