aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sds.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sds.h b/src/sds.h
index 98124a5..9b81489 100644
--- a/src/sds.h
+++ b/src/sds.h
@@ -42,12 +42,12 @@ struct sdshdr {
};
static inline size_t sdslen(const sds s) {
- struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
+ struct sdshdr *sh = s - (sizeof (struct sdshdr));
return sh->len;
}
static inline size_t sdsavail(const sds s) {
- struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
+ struct sdshdr *sh = s - (sizeof (struct sdshdr));
return sh->free;
}