Basic C linked list syntax error
<p>Note: I already got the intended function to work with my own code, but I saw a tutorial on another website and am wondering why it doesn't work. </p>

<p><a href="https://www.eskimo.com/~scs/cclass/int/sx8.html" rel="nofollow">https://www.eskimo.com/~scs/cclass/int/sx8.html</a></p>

<p>The premise is as follows:</p>

<p>I'm playing around with a very basic linked list:</p>

<pre><code>typedef struct node {
    int val;
    struct node * next;
} node_t;
</code></pre>

<p>I am trying to have a function remove an entry by value. It is as follows:</p>

<pre><code>int remove_by_value(node_t ** head, int val) {
    for(head = &amp;node_t; *head != NULL; head = &amp;(*head)-&gt;next){
        if ((*head)-&gt;val == val) {
            *head = (*head)-&gt;next;
            break;
        }
    }
}
</code></pre>

<p>However, I'm getting an error when calling this function, namely: </p>

<pre><code>"prog.c:35:17: error: expected expression before 'node_t'
 for(head = &amp;node_t; *head != NULL; head = &amp;(*head)-&gt;next){
 ^"
</code></pre>

<p>Any ideas? Is this just a simple syntax error that I'm not seeing? Thanks!</p>