-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15934 from leandrolanzieri/pr/pkg/wakaama_patch_n…
…ative_exception pkg/wakaama: add patch to cast macro to time_t
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
pkg/wakaama/patches/0021-core-registration-cast-to-time.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 0ee68890355c4ebd15323511c46ff109ad106d49 Mon Sep 17 00:00:00 2001 | ||
From: Leandro Lanzieri <[email protected]> | ||
Date: Fri, 5 Feb 2021 16:17:20 +0100 | ||
Subject: [PATCH] core/registration: cast to time_t | ||
|
||
--- | ||
core/registration.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/core/registration.c b/core/registration.c | ||
index 03fa851..aed3607 100644 | ||
--- a/core/registration.c | ||
+++ b/core/registration.c | ||
@@ -1313,9 +1313,9 @@ void registration_step(lwm2m_context_t * contextP, | ||
time_t interval; | ||
|
||
nextUpdate = targetP->lifetime; | ||
- if (COAP_MAX_TRANSMIT_WAIT < nextUpdate) | ||
+ if ((time_t)COAP_MAX_TRANSMIT_WAIT < nextUpdate) | ||
{ | ||
- nextUpdate -= COAP_MAX_TRANSMIT_WAIT; | ||
+ nextUpdate -= (time_t)COAP_MAX_TRANSMIT_WAIT; | ||
} | ||
else | ||
{ | ||
-- | ||
2.30.0 | ||
|