fixed an alignment problem with time_t is 32 bit, long is 64 bit, and arch is sparc or any other where unaligned accesses will result to sigbus

This commit is contained in:
antirez 2010-10-07 16:21:35 +02:00
parent fdc0bde935
commit 144a5e72f2

View File

@ -478,7 +478,7 @@ int expireIfNeeded(redisDb *db, robj *key) {
void expireGenericCommand(redisClient *c, robj *key, robj *param, long offset) {
dictEntry *de;
time_t seconds;
long seconds;
if (getLongFromObjectOrReply(c, param, &seconds, NULL) != REDIS_OK) return;