Module: kamailio
Branch: master
Commit: 2442d0748ef079c2152461792c64fc391e4def83
URL:
https://github.com/kamailio/kamailio/commit/2442d0748ef079c2152461792c64fc3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-01-06T09:27:05+01:00
jansson: avoid warning when long and long long have same size
---
Modified: src/modules/jansson/jansson_utils.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2442d0748ef079c2152461792c64fc3…
Patch:
https://github.com/kamailio/kamailio/commit/2442d0748ef079c2152461792c64fc3…
---
diff --git a/src/modules/jansson/jansson_utils.c b/src/modules/jansson/jansson_utils.c
index 813757030b..27ca34c9bb 100644
--- a/src/modules/jansson/jansson_utils.c
+++ b/src/modules/jansson/jansson_utils.c
@@ -111,7 +111,8 @@ int jansson_to_xval(sr_xval_t *val, char** freeme, json_t* v) {
}else if(json_is_integer(v)) {
#if JSON_INTEGER_IS_LONG_LONG
long long value = json_integer_value(v);
- if ((value > LONG_MAX) || (value < LONG_MIN)) {
+ if ((sizeof(long) < sizeof(long long))
+ && ((value > LONG_MAX) || (value < LONG_MIN))) {
char* svalue = NULL;
if (asprintf(&svalue, "%"JSON_INTEGER_FORMAT, value) < 0) {
ERR("asprintf failed\n");