summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-09-19 20:43:43 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-09-19 20:43:43 +0200
commitf87625777de2429c0691e321106b9016d35a4e4b (patch)
tree178e8f09d6cb7338526d3bc9c0daad351d574902
parentc18b58899e6cad293983fbe522d241bc6a7ce436 (diff)
Change function prototype
-rw-r--r--test.c8
1 files 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: ");