 <p>This is a standard way of traversing a <a href="http://en.wikipedia.org/wiki/Linked_list" rel="nofollow">linked list</a>. The loop terminates when p evaluates to false. In C anything that is not 0 evaluates to true. P is a pointer to a node of a linked list, it will become false when it is NULL. You can re-write this in a more clear fashion like this:</p> <pre><code>process_t *p; for(p = j-&gt;first_process; p != NULL; p = p-&gt;next) { ... } </code></pre>