Prevent so many copies of sdslen getting added

This commit is contained in:
John Sully 2019-02-10 19:31:46 -05:00
parent 5be3566838
commit adabbca14b
2 changed files with 2 additions and 2 deletions

2
deps/hiredis/sds.h vendored
View File

@ -83,7 +83,7 @@ struct __attribute__ ((__packed__)) sdshdr64 {
#define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T))))
#define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS)
static inline size_t sdslen(const sds s) {
inline size_t sdslen(const sds s) {
unsigned char flags = s[-1];
switch(__builtin_expect((flags&SDS_TYPE_MASK), SDS_TYPE_5)) {

View File

@ -90,7 +90,7 @@ struct __attribute__ ((__packed__)) sdshdr64 {
#define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T))))
#define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS)
static inline size_t sdslen(const sds s) {
inline size_t sdslen(const sds s) {
unsigned char flags = s[-1];
int type = flags & SDS_TYPE_MASK;