Skip to content

Commit

Permalink
Merge pull request #1012
Browse files Browse the repository at this point in the history
testing: fix integer overflow on i586
  • Loading branch information
mtomaschewski authored May 6, 2024
2 parents facb1a1 + a9e2a9e commit 2bde2d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/socket-mock-test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2022 SUSE LLC
* Copyright (C) 2024 SUSE LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -511,7 +511,7 @@ TESTCASE(timeout_and_expire)
CHECK(ni_socket_wait(20000) == 0);
CHECK(poll_args.timeout == 20000);

CHECK(ni_socket_wait(INT_MAX + 1L) == 0);
CHECK(ni_socket_wait(INT_MAX + (ni_timeout_t)1) == 0);
CHECK(poll_args.timeout == INT_MAX);
/* If no socket has get_timeout(), the given timeout is simply taken */
sock = ni_socket_wrap(10, 0);
Expand All @@ -520,7 +520,7 @@ TESTCASE(timeout_and_expire)
CHECK(ni_socket_wait(NI_TIMEOUT_INFINITE) == 0);
CHECK(poll_args.timeout == -1);

CHECK(ni_socket_wait(INT_MAX + 1L) == 0);
CHECK(ni_socket_wait(INT_MAX + (ni_timeout_t)1) == 0);
CHECK(poll_args.timeout == INT_MAX);

CHECK(ni_socket_wait(1000) == 0);
Expand Down

0 comments on commit 2bde2d9

Please sign in to comment.