From f87625777de2429c0691e321106b9016d35a4e4b Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sun, 19 Sep 2010 20:43:43 +0200 Subject: Change function prototype --- test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.c b/test.c index 2824159..2b64fa9 100644 --- a/test.c +++ b/test.c @@ -9,13 +9,13 @@ /* The following line is our testing "framework" :) */ #define test_cond(_c) if(_c) printf("PASSED\n"); else {printf("FAILED\n"); fails++;} -long long usec(void) { +static long long usec(void) { struct timeval tv; gettimeofday(&tv,NULL); return (((long long)tv.tv_sec)*1000000)+tv.tv_usec; } -void connect(int *fd) { +static void __connect(int *fd) { redisReply *reply = redisConnect(fd, "127.0.0.1", 6379); if (reply != NULL) { printf("Connection error: %s", reply->reply); @@ -28,7 +28,7 @@ int main(void) { int i, fails = 0; long long t1, t2; redisReply *reply; - connect(&fd); + __connect(&fd); /* test 0 */ printf("#0 Returns I/O error when the connection is lost: "); @@ -36,7 +36,7 @@ int main(void) { test_cond(reply->type == REDIS_REPLY_ERROR && strcasecmp(reply->reply,"i/o error") == 0); freeReplyObject(reply); - connect(&fd); /* reconnect */ + __connect(&fd); /* reconnect */ /* test 1 */ printf("#1 Is able to deliver commands: "); -- cgit v1.2.3