Bug is that sizeof pointer was allocated not size of the struct pointed to.
Also fix two compiler warnings where a size_t value was being used with %lu instead of %zu. On some platforms and compilers sizeof(long) != sizeof(size_t) and in such a case this was a compiler warning.
Bug is that sizeof pointer was allocated not size of the struct pointed to.
Also fix two compiler warnings where a size_t value was being used with %lu instead of %zu. On some platforms and compilers sizeof(long) != sizeof(size_t) and in such a case this was a compiler warning.
Signed-off-by: Dave Thaler dthaler@armidalesoftware.com