diff --git a/sds.h b/sds.h index 26f84e3..b53f24d 100644 --- a/sds.h +++ b/sds.h @@ -45,12 +45,12 @@ struct sdshdr { }; static inline size_t sdslen(const sds s) { - struct sdshdr *sh = (void*)(s-sizeof *sh); + struct sdshdr *sh = (struct sdshdr *)(s-sizeof *sh); return sh->len; } static inline size_t sdsavail(const sds s) { - struct sdshdr *sh = (void*)(s-sizeof *sh); + struct sdshdr *sh = (struct sdshdr *)(s-sizeof *sh); return sh->free; }