I have this:
alloc(Btree *bt, uint8_t *keylen, int16_t n)
{
bt->node[n].key = malloc(sizeof(int16_t)*(*keylen));
{
Where bt->node[n].key is a pointer to int16_t.
With the debugger running, I can verify that keylen is 5.
But if I put:
int kl = sizeof(bt->node[n].key) / sizeof(bt->node[n].key[0])
kl is 4.
What did I do wrong?
 
     
     
    