src/slist/slist.c
/*
 * Returns NULL in case an error has occurred.
 */
Returns NULL in case an error has occurred.
Returns NULL in case an error has occurred .
slist_t * slist_copy(slist_t * source)
{
    size_t size = sizeof(slist_t) + sizeof(void *) * source->size;
    slist_t * slist = (slist_t *) malloc(size);
    if (slist == NULL)
    {
        return NULL;
    }
    memcpy(slist, source, size);
    return slist;
}
slist_t * slist_copy ( slist_t * source ) { size_t size = sizeof ( slist_t ) + sizeof ( void * ) * source -> size ; slist_t * slist = ( slist_t * ) malloc ( size ) ; if ( slist == NULL ) { return NULL ; } memcpy ( slist , source , size ) ; return slist ; }
Returns NULL in case an error has occurred.
Returns NULL in case an error has occurred .