summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sds.h4
1 files changed, 2 insertions, 2 deletions
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;
}