<commit_before>/*
 * squareball: A general-purpose library for C99.
 * Copyright (C) 2014-2018 <NAME> <<EMAIL>>
 *
 * This program can be distributed under the terms of the BSD License.
 * See the file LICENSE.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */

#include <stdlib.h>
#include <squareball/sb-mem.h>
#include <squareball/sb-slist.h>


sb_slist_t*
sb_slist_append(sb_slist_t *l, void *data)
{
    sb_slist_t *node = sb_malloc(sizeof(sb_slist_t));

    // FIXME: remove this line, intentional for temporary testing
    void *foo = sb_malloc(10);

    node->data = data;
    node->next = NULL;
    if (l == NULL) {
        l = node;
    }
    else {
        sb_slist_t *tmp;
        for (tmp = l; tmp->next != NULL; tmp = tmp->next);
        tmp->next = node;
    }
    return l;
}

<commit_msg>reverted malloc call added for testing<commit_after>/*
 * squareball: A general-purpose library for C99.
 * Copyright (C) 2014-2018 <NAME> <<EMAIL>>
 *
 * This program can be distributed under the terms of the BSD License.
 * See the file LICENSE.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */

#include <stdlib.h>
#include <squareball/sb-mem.h>
#include <squareball/sb-slist.h>


sb_slist_t*
sb_slist_append(sb_slist_t *l, void *data)
{
    sb_slist_t *node = sb_malloc(sizeof(sb_slist_t));
    node->data = data;
    node->next = NULL;
    if (l == NULL) {
        l = node;
    }
    else {
        sb_slist_t *tmp;
        for (tmp = l; tmp->next != NULL; tmp = tmp->next);
        tmp->next = node;
    }
    return l;
}


{'fraction_non_alphanumeric': 0.13843236409608092, 'fraction_numerical': 0.01390644753476612, 'mean_word_length': 2.8329297820823243, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5725328', 'n_tokens_mistral': 605, 'n_tokens_neox': 577, 'n_words': 158}