sds
sds copied to clipboard
why not use macro to get the address of sdshdr?
I find that almost in every function, you write "struct sdshdr sh = (void)(s - sizeof *sh);" to get the address of sdshdr, I wonder why don't you make it macro? Like this : #define SDS_ADDR(s) (void *)((s) - sizeof(struct sdshdr)) struct sdshdr *sh = SDS_ADDR(s);
See pull request #9. I've applied this and many other fixes to my fork at https://github.com/lemzwerg/sds.