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/sliding_window.c

    ree6e802 r0a474e3  
    3030#include <string.h>
    3131
     32#include <stdio.h>
    3233/**
    3334 * Implements a sliding window via a ring buffer, this is a fixed size.
     
    4344        sw->start = 0;
    4445        sw->elements = calloc(sw->size, sizeof(void*));
    45         assert(sw->elements);
     46        /*assert(sw->elements);*/
     47        if (!sw->elements) {
     48                fprintf(stderr, "Unable to allocate memory for sw->elements in libtrace_slidingwindow_init()\n");
     49                return;
     50        }
    4651        memset((void *) sw->elements, 0, sizeof(void*) * sw->size);
    4752        sw->start_number = start_number;
Note: See TracChangeset for help on using the changeset viewer.