Module: kamailio
Branch: master
Commit: 3e94dd4bd3901d503c7be655d761f1d70453a451
URL:
https://github.com/kamailio/kamailio/commit/3e94dd4bd3901d503c7be655d761f1d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-05T10:24:06+02:00
core: use unsigned printing for version defines
---
Modified: src/core/ppcfg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3e94dd4bd3901d503c7be655d761f1d…
Patch:
https://github.com/kamailio/kamailio/commit/3e94dd4bd3901d503c7be655d761f1d…
---
diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c
index 5a85a4007c..e92cc872a8 100644
--- a/src/core/ppcfg.c
+++ b/src/core/ppcfg.c
@@ -297,7 +297,7 @@ void pp_define_core(void)
p++;
}
- n = snprintf(p, 64 - (int)(p-defval), "_%d", VERSIONVAL/1000000);
+ n = snprintf(p, 64 - (int)(p-defval), "_%u", VERSIONVAL/1000000);
if(n<0 || n>=64 - (int)(p-defval)) {
LM_ERR("failed to build define token\n");
return;
@@ -308,7 +308,7 @@ void pp_define_core(void)
return;
}
- n = snprintf(p, 64 - (int)(p-defval), "_%d_%d", VERSIONVAL/1000000,
+ n = snprintf(p, 64 - (int)(p-defval), "_%u_%u", VERSIONVAL/1000000,
(VERSIONVAL%1000000)/1000);
if(n<0 || n>=64 - (int)(p-defval)) {
LM_ERR("failed to build define token\n");
@@ -320,7 +320,7 @@ void pp_define_core(void)
return;
}
- n = snprintf(p, 64 - (int)(p-defval), "_%d_%d_%d", VERSIONVAL/1000000,
+ n = snprintf(p, 64 - (int)(p-defval), "_%u_%u_%u", VERSIONVAL/1000000,
(VERSIONVAL%1000000)/1000, VERSIONVAL%1000);
if(n<0 || n>=64 - (int)(p-defval)) {
LM_ERR("failed to build define token\n");