title: using exit(1) to return from a function
body: <p>linux gcc 4.4.1 C99</p>
  
  <p>I am just wondering is there any advantage using the following techniques. I noticed with some code I was reading the exit number went up in value, as displayed in this code snippet. </p>
  
  <pre><code>/* This would happen in 1 function */
  if(test condition 1)
  {
      /* something went wrong */
      exit(1);
  }
  
  if(test condition 2)
  {
      /* something went wrong with another condition*/
      exit(2);
  }
  </code></pre>
  
  <p>or doing the following and just returning:</p>
  
  <pre><code>/* This would happen in 1 function */
  if(test condition 1)
  {
      /* something went wrong */
      return;
  }
  
  if(test condition 2)
  {
      /* something went wrong with another condition*/
      return;
  }
  </code></pre>