From 6fe4146fad49a6525faed599cc4681e43b7d7910 Mon Sep 17 00:00:00 2001 From: Vicente Hernando Date: Fri, 2 Jun 2017 14:20:24 +0200 Subject: [PATCH] benchmark: b/f avoid undefined bytes when int and long int sizes mismatch. --- src/modules/benchmark/benchmark.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/benchmark/benchmark.c b/src/modules/benchmark/benchmark.c index d40469b6955..6e397c3db99 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");