sds icon indicating copy to clipboard operation
sds copied to clipboard

why not use macro to get the address of sdshdr?

Open aronlt opened this issue 11 years ago • 1 comments

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);

aronlt avatar Nov 14 '14 04:11 aronlt

See pull request #9. I've applied this and many other fixes to my fork at https://github.com/lemzwerg/sds.

lemzwerg avatar Feb 14 '15 10:02 lemzwerg