title: C finding out if a value exists in a linkedlist
body: <p>I am trying to write a method that finds out if a given value exists in a linked list. </p>
  
  <pre><code>// Returns true if the value exists in the list.
  int llist_exists(LinkedList * list, int value) {
  
        LinkedList *e;
        e = list-&gt;head;
        int result = 0;
  
        while(e != NULL)
        {
                if(e == value)
                {
                        result = 1;
                        break;
                }
        }
  
        return result;
  </code></pre>
  
  <p>}</p>