mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Fix three simple clang analyzer warnings
This commit is contained in:
parent
9b786b124d
commit
d956d809ac
@ -720,7 +720,7 @@ int rdbSave(char *filename) {
|
||||
char tmpfile[256];
|
||||
FILE *fp;
|
||||
rio rdb;
|
||||
int error;
|
||||
int error = 0;
|
||||
|
||||
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
|
||||
fp = fopen(tmpfile,"w");
|
||||
|
@ -577,7 +577,7 @@ void sentinelEvent(int level, char *type, sentinelRedisInstance *ri,
|
||||
if (level == REDIS_WARNING && ri != NULL) {
|
||||
sentinelRedisInstance *master = (ri->flags & SRI_MASTER) ?
|
||||
ri : ri->master;
|
||||
if (master->notification_script) {
|
||||
if (master && master->notification_script) {
|
||||
sentinelScheduleScriptExecution(master->notification_script,
|
||||
type,msg,NULL);
|
||||
}
|
||||
|
@ -1382,7 +1382,7 @@ void zremrangeGenericCommand(redisClient *c, int rangetype) {
|
||||
robj *key = c->argv[1];
|
||||
robj *zobj;
|
||||
int keyremoved = 0;
|
||||
unsigned long deleted;
|
||||
unsigned long deleted = 0;
|
||||
zrangespec range;
|
||||
zlexrangespec lexrange;
|
||||
long start, end, llen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user