Returning the next node
Your after() function is actually doing two things: it returns nod_ptr-&gt;next, but with the stipulation that the list starting at first_ptr contains nod_ptr.  Therefore, you should decompose it into two functions.

/**
 * Returns the content node if it is contained in the list starting at
 * head, otherwise NULL.  The list must not contain a cycle.
 */
node *find(node *head, node *content)
{
    for (node *n = head; n != NULL; n = n-&gt;next)
    {
        if (n == content)
        {
            return content;
        }
    }
    return NULL;
}

/**
 * If the list starting at head contains content, returns content-&gt;next.
 * Otherwise, returns NULL.
 */
node *after(node *head, node *content)
{
    return (content != NULL &amp;&amp; find(head, content)) ? content-&gt;next
                                                    : NULL;
}