summaryrefslogtreecommitdiff
path: root/sds.h
diff options
context:
space:
mode:
authorMatt Stancliff <matt@genges.com>2015-01-05 12:26:40 -0500
committerMatt Stancliff <matt@genges.com>2015-01-05 16:53:22 -0500
commit0cacb485feeb5318bd09b013833ca6e9026a5cc0 (patch)
tree128f5a85a8ff57593b6c80e53e5b011d42b4643f /sds.h
parent6a00a4643baaa920b182eb65ee82d9b8c23e3134 (diff)
Fix sds building with C++
These should really just be macros to shut up our type system.
Diffstat (limited to 'sds.h')
-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;
}