Module: kamailio Branch: master Commit: 6fe4146fad49a6525faed599cc4681e43b7d7910 URL: https://github.com/kamailio/kamailio/commit/6fe4146fad49a6525faed599cc4681e4...
Author: Vicente Hernando vhernando@systemonenoc.com Committer: Vicente Hernando vhernando@systemonenoc.com Date: 2017-06-02T14:20:24+02:00
benchmark: b/f avoid undefined bytes when int and long int sizes mismatch.
---
Modified: src/modules/benchmark/benchmark.c
---
Diff: https://github.com/kamailio/kamailio/commit/6fe4146fad49a6525faed599cc4681e4... Patch: https://github.com/kamailio/kamailio/commit/6fe4146fad49a6525faed599cc4681e4...
---
diff --git a/src/modules/benchmark/benchmark.c b/src/modules/benchmark/benchmark.c index d40469b695..6e397c3db9 100644 --- a/src/modules/benchmark/benchmark.c +++ b/src/modules/benchmark/benchmark.c @@ -479,7 +479,7 @@ static inline int fixup_bm_timer(void** param, int param_no) */ void bm_rpc_enable_global(rpc_t* rpc, void* ctx) { - long int v1; + int v1; if(rpc->scan(ctx, "d", (int*)(&v1))<1) { LM_WARN("no parameters\n"); rpc->fault(ctx, 500, "Invalid Parameters"); @@ -496,7 +496,7 @@ void bm_rpc_enable_global(rpc_t* rpc, void* ctx) void bm_rpc_enable_timer(rpc_t* rpc, void* ctx) { char *p1 = NULL; - long int v2 = 0; + int v2 = 0; unsigned int id = 0;
if(rpc->scan(ctx, "sd", &p1, (int*)(&v2))<2) { @@ -518,7 +518,7 @@ void bm_rpc_enable_timer(rpc_t* rpc, void* ctx)
void bm_rpc_granularity(rpc_t* rpc, void* ctx) { - long int v1; + int v1; if(rpc->scan(ctx, "d", (int*)(&v1))<1) { LM_WARN("no parameters\n"); rpc->fault(ctx, 500, "Invalid Parameters"); @@ -533,7 +533,7 @@ void bm_rpc_granularity(rpc_t* rpc, void* ctx)
void bm_rpc_loglevel(rpc_t* rpc, void* ctx) { - long int v1; + int v1; if(rpc->scan(ctx, "d", (int*)(&v1))<1) { LM_WARN("no parameters\n"); rpc->fault(ctx, 500, "Invalid Parameters");