Пример #1
0
static struct devtype *devtype_free(struct devtype *devtype) {
        if (!devtype)
                return NULL;

        assert(!c_list_first(&devtype->devices));

        free(devtype);

        return NULL;
}
Пример #2
0
static void teardown_destroy_list(void **state) {
    c_list_t *list = *state;
    c_list_t *walk = NULL;

    for (walk = c_list_first(list); walk != NULL; walk = c_list_next(walk)) {
        test_t *data;

        data = (test_t *) walk->data;
        free(data);
    }
    c_list_free(list);
    *state = NULL;
}