X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e612508d38532933c7a39299851c41ca5527d784..refs/heads/master:/src/redis-cli.c diff --git a/src/redis-cli.c b/src/redis-cli.c index 97caf5be..3969fbab 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1,6 +1,6 @@ /* Redis CLI (command line interface) * - * Copyright (c) 2009-2010, Salvatore Sanfilippo + * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,7 +95,7 @@ static long long mstime(void) { long long mst; gettimeofday(&tv, NULL); - mst = ((long)tv.tv_sec)*1000; + mst = ((long long)tv.tv_sec)*1000; mst += tv.tv_usec/1000; return mst; } @@ -1233,7 +1233,7 @@ int main(int argc, char **argv) { /* Pipe mode */ if (config.pipe_mode) { - cliConnect(0); + if (cliConnect(0) == REDIS_ERR) exit(1); pipeMode(); }