Skip to content

Commit

Permalink
[fix] va_list parameter type dismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
VCgege authored and patpatbear committed Jul 16, 2024
1 parent 582accd commit 6e0c87b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/ctrip_swap_blocked.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void submitSwapBlockedClientRequest(client* c, readyList *rl, dict* key_sets) {
robj* rkey = dictGetKey(de);
incrRefCount(rkey);
getKeyRequestsSwapBlockedLmove(dbid, SWAP_IN, c->cmd->intention_flags, CMD_SWAP_DATATYPE_LIST,
rkey, &result, -1, -1, 1/*num_ranges*/, -1, -1, 0);
rkey, &result, -1, -1, 1/*num_ranges*/, -1L, -1L, (int)0);
}
dictReleaseIterator(di);
swapUnblockedKeyChain* chain = createSwapUnblockedKeyChain(rl->db, rl->key);
Expand Down
18 changes: 9 additions & 9 deletions src/ctrip_swap_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ int getKeyRequestsLpop(int dbid, struct redisCommand *cmd, robj **argv,
}

getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,-1,-1,1/*num_ranges*/,0,count,0);
result,1,-1,-1,1/*num_ranges*/,0L,(long)count,(int)0);
return 0;

}
Expand All @@ -832,7 +832,7 @@ int getKeyRequestsBlpop(int dbid, struct redisCommand *cmd, robj **argv,
int argc, struct getKeyRequestsResult *result) {
for (int i = 1; i < argc-1; i++) {
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,i,-1,-1,1/*num_ranges*/,0,0,0);
result,i,-1,-1,1/*num_ranges*/,0L,0L,(int)0);
}
return 0;
}
Expand All @@ -847,23 +847,23 @@ int getKeyRequestsRpop(int dbid, struct redisCommand *cmd, robj **argv,
}

getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,-1,-1,1/*num_ranges*/,-count,-1,0);
result,1,-1,-1,1/*num_ranges*/,(long)-count,-1L,(int)0);
return 0;
}

int getKeyRequestsBrpop(int dbid, struct redisCommand *cmd, robj **argv,
int argc, struct getKeyRequestsResult *result) {
for (int i = 1; i < argc-1; i++) {
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,i,-1,-1,1/*num_ranges*/,-1,-1,0);
result,i,-1,-1,1/*num_ranges*/,-1L,-1L,(int)0);
}
return 0;
}

int getKeyRequestsRpoplpush(int dbid, struct redisCommand *cmd, robj **argv,
int argc, struct getKeyRequestsResult *result) {
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,-1,-1,1/*num_ranges*/,-1,-1,0); /* source */
result,1,-1,-1,1/*num_ranges*/,-1L,-1L,(int)0); /* source */
getKeyRequestsSingleKey(result,argv[2],SWAP_IN,SWAP_IN_META,cmd->flags | CMD_SWAP_DATATYPE_KEYSPACE,dbid);
return 0;
}
Expand All @@ -884,7 +884,7 @@ int getKeyRequestsLmove(int dbid, struct redisCommand *cmd, robj **argv,
}
/* source */
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,-1,-1,1/*num_ranges*/,start,end,0);
result,1,-1,-1,1/*num_ranges*/,start,end,(int)0);
/* destination */
getKeyRequestsSingleKey(result,argv[2],SWAP_IN,SWAP_IN_META,cmd->flags,dbid);
return 0;
Expand All @@ -895,7 +895,7 @@ int getKeyRequestsLindex(int dbid, struct redisCommand *cmd, robj **argv,
long long index;
if (getLongLongFromObject(argv[2],&index) != C_OK) return -1;
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,2,-1,1/*num_ranges*/,index,index,0);
result,1,2,-1,1/*num_ranges*/,(long)index,(long)index,(int)0);
return 0;
}

Expand All @@ -905,7 +905,7 @@ int getKeyRequestsLrange(int dbid, struct redisCommand *cmd, robj **argv,
if (getLongLongFromObject(argv[2],&start) != C_OK) return -1;
if (getLongLongFromObject(argv[3],&end) != C_OK) return -1;
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,2,3,1/*num_ranges*/,start,end,0);
result,1,2,3,1/*num_ranges*/,(long)start,(long)end,(int)0);
return 0;
}

Expand All @@ -915,7 +915,7 @@ int getKeyRequestsLtrim(int dbid, struct redisCommand *cmd, robj **argv,
if (getLongLongFromObject(argv[2],&start) != C_OK) return -1;
if (getLongLongFromObject(argv[3],&stop) != C_OK) return -1;
getKeyRequestsSingleKeyWithRanges(dbid,cmd,argv,argc,
result,1,2,3,1/*num_ranges*/,start,stop,1/*reverse*/);
result,1,2,3,1/*num_ranges*/,(long)start,(long)stop,(int)1/*reverse*/);
return 0;
}
/** zset **/
Expand Down

0 comments on commit 6e0c87b

Please sign in to comment.