C expected expression before struct error

1 The keyword static is a keyword and does not need to be added when trying to call a function marked with static. See this for more information. 2 You also cannot implicitily convert a structure to another data-type. You are trying to do this in the print_abc function. You need to explicitly access the … Read more

free() not working correctly with struct

It is always a good habit to set the pointer to NULL after freeing it. Since the memory you are accessing is still intact you are seeing right values for l->val. Node *l=malloc(sizeof(Node)); l->key=”foo”; l->val=”bar”; free(l); l = NULL;

Structure size so big, need optimization

Your Test structure is quite large, 588,000 bytes, which might be too large for automatic storage. Make it static should solve the problem, but will make your code non reentrant and definitely not thread safe. If the problem is with the maximum packet size, you must break the transmission into smaller packets. Use a smaller … Read more