[sr-dev] git:5.3:6f871feb: cfgutils: use same type for local variable in rpc gflags functions

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 19 19:24:26 CET 2020


Module: kamailio
Branch: 5.3
Commit: 6f871feb31e8d1b53b7d0161f2d5643c567b0f9a
URL: https://github.com/kamailio/kamailio/commit/6f871feb31e8d1b53b7d0161f2d5643c567b0f9a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-03-19T19:20:55+01:00

cfgutils: use same type for local variable in rpc gflags functions

(cherry picked from commit 5411eda4e44a487479d00433583a68a328aca9a3)

---

Modified: src/modules/cfgutils/cfgutils.c

---

Diff:  https://github.com/kamailio/kamailio/commit/6f871feb31e8d1b53b7d0161f2d5643c567b0f9a.diff
Patch: https://github.com/kamailio/kamailio/commit/6f871feb31e8d1b53b7d0161f2d5643c567b0f9a.patch

---

diff --git a/src/modules/cfgutils/cfgutils.c b/src/modules/cfgutils/cfgutils.c
index 285265d690..b0b063585b 100644
--- a/src/modules/cfgutils/cfgutils.c
+++ b/src/modules/cfgutils/cfgutils.c
@@ -301,7 +301,7 @@ void cfgutils_rpc_set_gflag(rpc_t* rpc, void* ctx)
 
 void cfgutils_rpc_reset_gflag(rpc_t* rpc, void* ctx)
 {
-	long int flag;
+	unsigned int flag;
 	if(rpc->scan(ctx, "d", (int*)(&flag))<1) {
 		LM_WARN("no parameters\n");
 		rpc->fault(ctx, 500, "Invalid Parameters");
@@ -314,7 +314,7 @@ void cfgutils_rpc_reset_gflag(rpc_t* rpc, void* ctx)
 
 void cfgutils_rpc_is_gflag(rpc_t* rpc, void* ctx)
 {
-	long int flag;
+	unsigned int flag;
 	if(rpc->scan(ctx, "d", (int*)(&flag))<1) {
 		LM_WARN("no parameters\n");
 		rpc->fault(ctx, 500, "Invalid Parameters");
@@ -328,7 +328,7 @@ void cfgutils_rpc_is_gflag(rpc_t* rpc, void* ctx)
 
 void cfgutils_rpc_get_gflags(rpc_t* rpc, void* ctx)
 {
-	static unsigned int flags;
+	unsigned int flags;
 
 	flags = *gflags;
 




More information about the sr-dev mailing list