Commit 3842bfd8 authored by Wen Hui's avatar Wen Hui Committed by Oran Agra
Browse files

[module] using predefined REDISMODULE_NO_EXPIRE in RM_GetExpire (#7669)

It was already defined in the API header and the documentation, but not used by the implementation.

(cherry picked from commit 93d87d6d)
parent 6dcd6416
......@@ -2100,7 +2100,8 @@ int RM_UnlinkKey(RedisModuleKey *key) {
* REDISMODULE_NO_EXPIRE is returned. */
mstime_t RM_GetExpire(RedisModuleKey *key) {
mstime_t expire = getExpire(key->db,key->key);
if (expire == -1 || key->value == NULL) return -1;
if (expire == -1 || key->value == NULL)
return REDISMODULE_NO_EXPIRE;
expire -= mstime();
return expire >= 0 ? expire : 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment