title: mmap return value during error
body: <p>I could see in the mmap man page the return value during error condition is <code>(void *)-1.</code></p>
  
  <p>how c compiler will treat <code>(void *)</code> before a constant, here <code>-1</code>.</p>
  
  <p>is the following code snippet is the correct way of checking the error value of mmap?</p>
  
  <pre><code>int *p;
  p = (int *)mmap();
  if(p == -1)
          printf("error \n");
  </code></pre>
  
  <p>do we need to use the following error condition check.</p>
  
  <pre><code>if(*p == -1)
          printf("error \n");
  </code></pre>