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];
|
char tmpfile[256];
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
rio rdb;
|
rio rdb;
|
||||||
int error;
|
int error = 0;
|
||||||
|
|
||||||
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
|
snprintf(tmpfile,256,"temp-%d.rdb", (int) getpid());
|
||||||
fp = fopen(tmpfile,"w");
|
fp = fopen(tmpfile,"w");
|
||||||
|
@ -577,7 +577,7 @@ void sentinelEvent(int level, char *type, sentinelRedisInstance *ri,
|
|||||||
if (level == REDIS_WARNING && ri != NULL) {
|
if (level == REDIS_WARNING && ri != NULL) {
|
||||||
sentinelRedisInstance *master = (ri->flags & SRI_MASTER) ?
|
sentinelRedisInstance *master = (ri->flags & SRI_MASTER) ?
|
||||||
ri : ri->master;
|
ri : ri->master;
|
||||||
if (master->notification_script) {
|
if (master && master->notification_script) {
|
||||||
sentinelScheduleScriptExecution(master->notification_script,
|
sentinelScheduleScriptExecution(master->notification_script,
|
||||||
type,msg,NULL);
|
type,msg,NULL);
|
||||||
}
|
}
|
||||||
|
@ -1382,7 +1382,7 @@ void zremrangeGenericCommand(redisClient *c, int rangetype) {
|
|||||||
robj *key = c->argv[1];
|
robj *key = c->argv[1];
|
||||||
robj *zobj;
|
robj *zobj;
|
||||||
int keyremoved = 0;
|
int keyremoved = 0;
|
||||||
unsigned long deleted;
|
unsigned long deleted = 0;
|
||||||
zrangespec range;
|
zrangespec range;
|
||||||
zlexrangespec lexrange;
|
zlexrangespec lexrange;
|
||||||
long start, end, llen;
|
long start, end, llen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user