Skip to content

Commit 736ac48

Browse files
committed
use unsigned long for maxiterations fixing undef behavior
Signed-off-by: Fusl <[email protected]>
1 parent 8973cdf commit 736ac48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ void scanGenericCommand(client *c, robj *o, unsigned long long cursor) {
11991199
* COUNT, so if the hash table is in a pathological state (very
12001200
* sparsely populated) we avoid to block too much time at the cost
12011201
* of returning no or very few elements. */
1202-
long maxiterations = count * 10;
1202+
unsigned long maxiterations = (unsigned long)count * 10UL;
12031203

12041204
/* We pass scanData which have three pointers to the callback:
12051205
* 1. data.keys: the list to which it will add new elements;

0 commit comments

Comments
 (0)