Commit eed189ff authored by Vitaly Arbuzov's avatar Vitaly Arbuzov
Browse files

Fix spacing issue and remove invalid comment

parent f2805b2c
...@@ -55,7 +55,7 @@ dict *dbIteratorNextDict(dbIterator *dbit) { ...@@ -55,7 +55,7 @@ dict *dbIteratorNextDict(dbIterator *dbit) {
if (!server.cluster_enabled) { if (!server.cluster_enabled) {
dbit->cur_slot = dbit->index++ ? -1 : 0; dbit->cur_slot = dbit->index++ ? -1 : 0;
} else if (intsetGet(dbit->db->non_empty_dicts, dbit->index++, &slot)){ } else if (intsetGet(dbit->db->non_empty_dicts, dbit->index++, &slot)){
dbit->cur_slot = (int) slot; dbit->cur_slot = (int) slot;
return dbit->db->dict[slot]; return dbit->db->dict[slot];
} }
return dbit->cur_slot >= 0 ? dbit->db->dict[dbit->cur_slot] : NULL; return dbit->cur_slot >= 0 ? dbit->db->dict[dbit->cur_slot] : NULL;
...@@ -377,7 +377,7 @@ robj *dbRandomKey(redisDb *db) { ...@@ -377,7 +377,7 @@ robj *dbRandomKey(redisDb *db) {
robj *keyobj; robj *keyobj;
dict *randomDict = getRandomDict(db); dict *randomDict = getRandomDict(db);
de = dictGetFairRandomKey(randomDict); de = dictGetFairRandomKey(randomDict);
if (de == NULL) return NULL; // TODO consider other non-empty slot buckets. if (de == NULL) return NULL;
key = dictGetKey(de); key = dictGetKey(de);
keyobj = createStringObject(key,sdslen(key)); keyobj = createStringObject(key,sdslen(key));
......
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