summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2019-07-12 12:36:33 +0200
committerGitHub <noreply@github.com>2019-07-12 12:36:33 +0200
commit6100a82a3ab03f6e822844392eb0dfcabcd01b42 (patch)
tree17aba7df8e0b9faf8037b75b3caa99a1c7d4d190
parent2a99f199bc806a5659c4d7ce0ea588c4ea6c1f6d (diff)
parent6b818efeb62356358ea5a5187fd02889940d4bd0 (diff)
downloadredis-6100a82a3ab03f6e822844392eb0dfcabcd01b42.tar.gz
Merge pull request #5738 from bmerry/fix-swapdb-int-overflow
Make dbSwapDatabases take args as long
-rw-r--r--src/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index 8b7656802..51f5a12b4 100644
--- a/src/db.c
+++ b/src/db.c
@@ -1028,7 +1028,7 @@ void scanDatabaseForReadyLists(redisDb *db) {
*
* Returns C_ERR if at least one of the DB ids are out of range, otherwise
* C_OK is returned. */
-int dbSwapDatabases(int id1, int id2) {
+int dbSwapDatabases(long id1, long id2) {
if (id1 < 0 || id1 >= server.dbnum ||
id2 < 0 || id2 >= server.dbnum) return C_ERR;
if (id1 == id2) return C_OK;