Singly-linked implementation in C
Returning root

Returning the root suggests the use case

    root = slist_push_front(root, value);


However, if node allocation fails, the return value is NULL, and the whole list is lost. I recommend to change the signature to

    int slist_push_front(slist_t ** rootptr, int value);


to be used along the lines of

    if (slist_push_front(&amp;root, value) == FAIL) {
        ....
    }






In slist_push_front, it doesn't matter whether the root is NULL or not. node-&gt;next = root will work just fine in both cases.
In slist_push_back the next pointer must become null in any case, so it seems logical to assign it once when the node is created.

I also recommend to refactor the while (temp-&gt;next) loop into a slist_get_tail function. Then slist_push_back is streamlined into

int slist_push_back(slist_t ** root, int val)
{
    slist_t * node = slist_create_node(val);
    if (node == NULL) {
        return FAILURE;
    }
    slist_t * tail = slist_get_tail(*root);
    if (tail) {
        tail-&gt;next = node;
    } else {
        *root = node;
    }