Module: kamailio
Branch: master
Commit: 0186246fce8f0e4bb46b30c05174983cd957a3ba
URL:
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-27T09:24:33+01:00
statsd: use bool type for local variable to match return of function
---
Modified: src/modules/statsd/statsd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
Patch:
https://github.com/kamailio/kamailio/commit/0186246fce8f0e4bb46b30c05174983…
---
diff --git a/src/modules/statsd/statsd.c b/src/modules/statsd/statsd.c
index 9724c9244e2..e9d3682bbd4 100644
--- a/src/modules/statsd/statsd.c
+++ b/src/modules/statsd/statsd.c
@@ -99,7 +99,7 @@ struct module_exports exports = {
static int mod_init(void)
{
- int rc = 0;
+ bool rc = false;
if(!statsd_params.ip) {
LM_INFO("Statsd init ip value is null. use default 127.0.0.1\n");
} else {
@@ -113,7 +113,7 @@ static int mod_init(void)
}
rc = statsd_init(statsd_params.ip, statsd_params.port);
- if(rc < 0) {
+ if(rc == false) {
LM_ERR("Statsd connection failed (ERROR_CODE: %i)\n", rc);
return -1;
} else {