From: INSUN PYO Date: Tue, 19 Jul 2016 04:29:08 +0000 (+0900) Subject: [PATCH 1/2] kdbus: Fix the overflow for timeout calculation X-Git-Tag: accepted/tizen/ivi/20160719.104426^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3c91b26d62eb2ae8bd7de2b4470022cdac81f1d;p=platform%2Fupstream%2Fdbus.git [PATCH 1/2] kdbus: Fix the overflow for timeout calculation The maximum value of unsigned long is 4294967295 which is too small for storing nano second. It makes the overflow in calculation. Use LLU instead of LU for timeout calculation. ====================================================================== Subject: [PATCH 2/2] kdbus: adjust the default value for timeout to 50 sec This definition is used by the default value for timeout value. But in the other places, 50 sec is used by default value for timeout, instead of using it. Let's align it with the others Signed-off-by: INSUN PYO Change-Id: Idddaf3f095ad47206f8b6ac11bc46c43c3bc8bd3 --- diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index 63e258d..759c3d7 100644 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -102,7 +102,7 @@ int debug = -1; ((uint8_t *)(iter) < (uint8_t *)(first) + (_size)) && \ ((uint8_t *)(iter) >= (uint8_t *)(first)); \ iter = (void*)(((uint8_t *)iter) + ALIGN8((iter)->size))) -#define KDBUS_DEFAULT_TIMEOUT_NS 5000000000LU +#define KDBUS_DEFAULT_TIMEOUT_NS 50000000000LLU /** * @defgroup DBusTransportKdbus DBusTransport implementations for kdbus