I'm not sure if the following piece of code should work ok in all conditions so if someone can check the code and see if its right I would appreciate it very much.
PS: If you wonder why I ask, its because the only rule I remember for that kind of function is that you should never return a pointer to a local variable.Code:float* returnFloatValue(int block, char *key) { char *tmp = block_value(block, key); float *tmpFloat; if (strlen(tmp)) { tmpFloat = atof(tmp); return &tmpFloat; } return NULL; }