[sr-dev] git:master:3e94dd4b: core: use unsigned printing for version defines
Daniel-Constantin Mierla
miconda at gmail.com
Mon Sep 5 10:24:34 CEST 2022
Module: kamailio
Branch: master
Commit: 3e94dd4bd3901d503c7be655d761f1d70453a451
URL: https://github.com/kamailio/kamailio/commit/3e94dd4bd3901d503c7be655d761f1d70453a451
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/3e94dd4bd3901d503c7be655d761f1d70453a451.diff
Patch: https://github.com/kamailio/kamailio/commit/3e94dd4bd3901d503c7be655d761f1d70453a451.patch
---
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");
More information about the sr-dev
mailing list