Skip to content

Commit

Permalink
benchmark: b/f avoid undefined bytes when int and long int sizes mism…
Browse files Browse the repository at this point in the history
…atch.

(cherry picked from commit 6fe4146)
  • Loading branch information
Vicente Hernando authored and miconda committed Jun 12, 2017
1 parent e94b1aa commit 75b19bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/benchmark/benchmark.c
Expand Up @@ -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");
Expand All @@ -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) {
Expand All @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit 75b19bf

Please sign in to comment.