mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-03-23 20:10:51 +01:00
dbus-connection: Avoid computing a negative timeout
Getting into the `if (timeout == NULL)` block means that timeout_milliseconds == -1, so it doesn't make sense to do arithmetic on it. Pass -1 instead of a nonsensical value in this case
This commit is contained in:
parent
5035f4bda6
commit
fdb6746d85
1 changed files with 2 additions and 2 deletions
|
|
@ -2510,7 +2510,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
|
|||
*/
|
||||
_dbus_verbose ("dbus_connection_send_with_reply_and_block() waiting for more memory\n");
|
||||
|
||||
_dbus_memory_pause_based_on_timeout (timeout_milliseconds - elapsed_milliseconds);
|
||||
_dbus_memory_pause_based_on_timeout (-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2519,7 +2519,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
|
|||
pending,
|
||||
DBUS_ITERATION_DO_READING |
|
||||
DBUS_ITERATION_BLOCK,
|
||||
timeout_milliseconds - elapsed_milliseconds);
|
||||
-1);
|
||||
}
|
||||
|
||||
goto recheck_status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue