From 71eba4775d886fe85337560e2103680390ed2cdd Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 31 Oct 2009 14:32:01 +0100 Subject: [PATCH] Fixed compilation on Linux --- redis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redis.c b/redis.c index f57ec816..d6d2e449 100644 --- a/redis.c +++ b/redis.c @@ -1104,7 +1104,7 @@ static void initServer() { aeCreateTimeEvent(server.el, 1000, serverCron, NULL, NULL); if (server.appendonly) { - server.appendfd = open(server.appendfilename,O_WRONLY|O_APPEND|O_CREAT); + server.appendfd = open(server.appendfilename,O_WRONLY|O_APPEND|O_CREAT,0644); if (server.appendfd == -1) { redisLog(REDIS_WARNING, "Can't open the append-only file: %s", strerror(errno)); @@ -1725,7 +1725,7 @@ static void feedAppendOnlyFile(struct redisCommand *cmd, int dictid, robj **argv * there is much to do about the whole server stopping for power problems * or alike */ nwritten = write(server.appendfd,buf,sdslen(buf)); - if (nwritten != (unsigned)sdslen(buf)) { + if (nwritten != (signed)sdslen(buf)) { /* Ooops, we are in troubles. The best thing to do for now is * to simply exit instead to give the illusion that everything is * working as expected. */ -- 2.45.2