mesh: Fix type checking for 32 vs 64 bit systems
PATCH 1/1 mesh: Fix type checking for 32 vs 64 bit systems
--- mesh/cfgmod-server.c | 2 +- mesh/model.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
mesh/cfgmod-server.c +1 -1
@@ -1129,7 +1129,7 @@ static bool cfg_srv_pkt(uint16_t src, uint32_t dst,gettimeofday (&time_now,NULL ); time_now.tv_sec -= hb->sub_start; -if (time_now.tv_sec >= hb->sub_period) +if (time_now.tv_sec >= (long int ) hb->sub_period) time_now.tv_sec =0 ;else time_now.tv_sec = hb->sub_period - time_now.tv_sec;
mesh/model.c +3 -3
@@ -414,15 +414,15 @@ static void cmplt(uint16_t remote, uint8_t status,gettimeofday (&tx_end,NULL );if (tx_end.tv_sec == tx_start.tv_sec) { -l_debug ("Duration 0.%zu seconds" , +l_debug ("Duration 0.%6.6lu seconds" , tx_end.tv_usec - tx_start.tv_usec); }else {if (tx_start.tv_usec > tx_end.tv_usec) -l_debug ("Duration %zu.%zu seconds" , +l_debug ("Duration %lu.%6.6lu seconds" , tx_end.tv_sec - tx_start.tv_sec -1 , tx_end.tv_usec +1000000 - tx_start.tv_usec);else -l_debug ("Duration %zu.%zu seconds" , +l_debug ("Duration %lu.%6.6lu seconds" , tx_end.tv_sec - tx_start.tv_sec, tx_end.tv_usec - tx_start.tv_usec); }
Signature · 1 line
2.14.5
Gix, Brian
AppliedApplied
Quoted 52 lines
-----Original Message-----
From: Gix, Brian
Sent: Wednesday, February 27, 2019 10:13 AM
To: [email protected]
Cc: Stotland, Inga <[email protected]>; Gix, Brian <[email protected]>; [email protected]
Subject: [PATCH BlueZ] mesh: Fix type checking for 32 vs 64 bit systems--- mesh/cfgmod-server.c | 2 +- mesh/model.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)mesh/cfgmod-server.c index renamed from mesh/cfgmod-server.c +0
-0
992d4ac6a..9dc82eef6100644mesh/cfgmod-server.c +1
-1@@ -1129,7 +1129,7 @@ static bool cfg_srv_pkt(uint16_t src, uint32_t dst,gettimeofday (&time_now,NULL ); time_now.tv_sec -= hb->sub_start; -if (time_now.tv_sec >= hb->sub_period) +if (time_now.tv_sec >= (long int ) hb->sub_period) time_now.tv_sec =0 ;else time_now.tv_sec = hb->sub_period -time_now.tv_sec; diff --git
a/mesh/model.cb/mesh/model.cindex1e302b73b..5940f6854100644mesh/model.c +3
-3@@ -414,15 +414,15 @@ static void cmplt(uint16_t remote, uint8_t status,gettimeofday (&tx_end,NULL );if (tx_end.tv_sec == tx_start.tv_sec) { -l_debug ("Duration 0.%zu seconds" , +l_debug ("Duration 0.%6.6lu seconds" , tx_end.tv_usec - tx_start.tv_usec); }else {if (tx_start.tv_usec > tx_end.tv_usec) -l_debug ("Duration %zu.%zu seconds" , +l_debug ("Duration %lu.%6.6lu seconds" , tx_end.tv_sec - tx_start.tv_sec -1 , tx_end.tv_usec +1000000 - tx_start.tv_usec);else -l_debug ("Duration %zu.%zu seconds" , +l_debug ("Duration %lu.%6.6lu seconds" , tx_end.tv_sec - tx_start.tv_sec, tx_end.tv_usec - tx_start.tv_usec);}
--
2.14.5