Skip to content

Commit

Permalink
Replace assert with trivial return
Browse files Browse the repository at this point in the history
  • Loading branch information
moticless committed Oct 29, 2024
1 parent b206687 commit 832a7ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ void updateLFU(robj *val) {
* [1,2)->0 [2,4)->1 [4,8)->2 [8,16)->3
*/
void updateKeysizesHist(redisDb *db, int didx, uint32_t type, uint64_t oldLen, uint64_t newLen) {
serverAssert(unlikely(type < OBJ_TYPE_BASIC_MAX));
if(unlikely(type >= OBJ_TYPE_BASIC_MAX))
return;

kvstoreDictMetadata *dictMeta = kvstoreGetDictMetadata(db->keys, didx);
kvstoreMetadata *kvstoreMeta = kvstoreGetMetadata(db->keys);
Expand Down

0 comments on commit 832a7ad

Please sign in to comment.