diff options
Diffstat (limited to 'src/t_stream.c')
-rw-r--r-- | src/t_stream.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/t_stream.c b/src/t_stream.c index 1b0d012e4..d1b144a8f 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -241,24 +241,6 @@ robj *streamDup(robj *o) { return sobj; } -/* This is just a wrapper for lpAppend() to directly use a 64 bit integer - * instead of a string. */ -unsigned char *lpAppendInteger(unsigned char *lp, int64_t value) { - char buf[LONG_STR_SIZE]; - int slen = ll2string(buf,sizeof(buf),value); - return lpAppend(lp,(unsigned char*)buf,slen); -} - -/* This is just a wrapper for lpReplace() to directly use a 64 bit integer - * instead of a string to replace the current element. The function returns - * the new listpack as return value, and also updates the current cursor - * by updating '*pos'. */ -unsigned char *lpReplaceInteger(unsigned char *lp, unsigned char **pos, int64_t value) { - char buf[LONG_STR_SIZE]; - int slen = ll2string(buf,sizeof(buf),value); - return lpInsert(lp, (unsigned char*)buf, slen, *pos, LP_REPLACE, pos); -} - /* This is a wrapper function for lpGet() to directly get an integer value * from the listpack (that may store numbers as a string), converting * the string if needed. @@ -3577,7 +3559,7 @@ int streamValidateListpackIntegrity(unsigned char *lp, size_t size, int deep) { /* Since we don't want to run validation of all records twice, we'll * run the listpack validation of just the header and do the rest here. */ - if (!lpValidateIntegrity(lp, size, 0)) + if (!lpValidateIntegrity(lp, size, 0, NULL, NULL)) return 0; /* In non-deep mode we just validated the listpack header (encoded size) */ |