Skip to content

Commit 81fb72b

Browse files
committed
Use sizeof(LONG_LONG) instead of magic number
1 parent e9b2e83 commit 81fb72b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysql2/statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int my_big2ll(VALUE bignum, LONG_LONG *ptr)
218218
#else
219219
len = RBIGNUM_LEN(bignum) * SIZEOF_BDIGITS;
220220
#endif
221-
if (len > 8) goto overflow;
221+
if (len > sizeof(LONG_LONG)) goto overflow;
222222
if (RBIGNUM_POSITIVE_P(bignum)) {
223223
num = rb_big2ull(bignum);
224224
if (num > LLONG_MAX)

0 commit comments

Comments
 (0)