aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sds.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sds.h b/src/sds.h
index 2d98969..9a2187e 100644
--- a/src/sds.h
+++ b/src/sds.h
@@ -46,13 +46,11 @@ static inline struct sdshdr * sdsheader(const sds s) {
}
static inline size_t sdslen(const sds s) {
- struct sdshdr *sh = sdsheader(s);
- return sh->len;
+ return sdsheader(s)->len;
}
static inline size_t sdsavail(const sds s) {
- struct sdshdr *sh = sdsheader(s);
- return sh->free;
+ return sdsheader(s)->free;
}
sds sdsnewlen(const void *init, size_t initlen);