Skip to content

Commit 93d87d6

Browse files
authored
[module] using predefined REDISMODULE_NO_EXPIRE in RM_GetExpire (redis#7669)
It was already defined in the API header and the documentation, but not used by the implementation.
1 parent cdd925b commit 93d87d6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/module.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,8 @@ int RM_UnlinkKey(RedisModuleKey *key) {
21592159
* REDISMODULE_NO_EXPIRE is returned. */
21602160
mstime_t RM_GetExpire(RedisModuleKey *key) {
21612161
mstime_t expire = getExpire(key->db,key->key);
2162-
if (expire == -1 || key->value == NULL) return -1;
2162+
if (expire == -1 || key->value == NULL)
2163+
return REDISMODULE_NO_EXPIRE;
21632164
expire -= mstime();
21642165
return expire >= 0 ? expire : 0;
21652166
}

0 commit comments

Comments
 (0)