Convert unsigned char array with int to unsigned char
<p>Can somebody help me out with below error. Shall I cast <code>len</code> before I try to pass <code>buf</code>?</p>

<pre><code>int len=2;
unsigned char tmp[len + 1];
unsigned char * buf = &amp;tmp;
</code></pre>

<p>The error is:</p>

<pre><code>error: cannot convert 'unsigned char (*)[(((unsigned int)((int)len)) + 1)]' to 'unsigned char*' in assignment
</code></pre>
