title: strtok behaving inconsistently
body: <p>I am trying to read data from a file, tokenize it and sort it, however <code>strtok</code> behaves erratically when I run it, sometimes it works sometimes it doesn't and I get very short/odd tokens.</p>
  
  <p>Valgrind seems to think it is because strtok is relying on an uninitialised value (I think):</p>
  
  <pre><code>==7069== Conditional jump or move depends on uninitialised value(s)  
  ==7069==    at 0x40B61A3: strtok (strtok.S:160)  
  ==7069==    by 0x8048842: main (main.c:58)
  </code></pre>
  
  <p>Here is the function that I think valgrind is accusing:</p>
  
  <pre><code>char * getNextToken(char * line) {  
      char delim = ',';  
      return strtok(line, &amp;delim);  
  }
  </code></pre>
  
  <p>Could this be because line is <code>NULL</code> for most of my calls to <code>strtok</code>?</p>
  
  <p>Here are my calls to the function:</p>
  
  <pre><code>strcpy(performer, getNextToken(inputLine));  
  strcpy(title, getNextToken(NULL));  
  strcpy(charMin, getNextToken(NULL));  
  /*etc...*/
  </code></pre>
  
  <p>I have no idea what could be causing this and all the values I give <code>strtok</code> are what I am expecting. Also I will occasionally get a stack smashing error, I don't know why.</p>