Skip to content

Commit 2256190

Browse files
committed
Addendum #1 to bug #21034322: fixed a signed/unsigned comparison.
1 parent 379cc2a commit 2256190

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/version_token/version_token.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ PLUGIN_EXPORT long long version_tokens_lock_shared(
957957
{
958958
long long timeout= *((long long*)args->args[args->arg_count - 1]);
959959

960-
if (timeout < 0 || timeout > LONG_MAX)
960+
if (timeout < 0 || timeout > ((long long) ULONG_MAX))
961961
{
962962
my_error(ER_DATA_OUT_OF_RANGE, MYF(0), "timeout",
963963
"version_tokens_lock_shared");
@@ -984,7 +984,7 @@ PLUGIN_EXPORT long long version_tokens_lock_exclusive(
984984
{
985985
long long timeout= *((long long*)args->args[args->arg_count - 1]);
986986

987-
if (timeout < 0 || timeout > LONG_MAX)
987+
if (timeout < 0 || timeout > ((long long) ULONG_MAX))
988988
{
989989
my_error(ER_DATA_OUT_OF_RANGE, MYF(0), "timeout",
990990
"version_tokens_lock_exclusive");

0 commit comments

Comments
 (0)