-off_t rdbSavedObjectLen(robj *o, FILE *fp) {
- int nwritten;
- if (fp == NULL) fp = server.devnull;
- rewind(fp);
-
- /* Determining the saved length of an object should never return -1 */
- redisAssert((nwritten = rdbSaveObject(fp,o)) != -1);
- return nwritten;
+off_t rdbSavedObjectLen(robj *o) {
+ int len = rdbSaveObject(NULL,o);
+ redisAssert(len != -1);
+ return len;