From b6b96f776ea2f954b50d553cd16f4990d70260dc Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 22 Nov 2010 10:37:14 +0100 Subject: Make error messages consistent in casing --- hiredis.c | 2 +- net.c | 2 +- test.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hiredis.c b/hiredis.c index a2d8515..f6b1d54 100644 --- a/hiredis.c +++ b/hiredis.c @@ -347,7 +347,7 @@ static int processItem(redisReader *r) { default: byte = sdscatrepr(sdsempty(),p,1); redisSetReplyReaderError(r,sdscatprintf(sdsempty(), - "protocol error, got %s as reply type byte", byte)); + "Protocol error, got %s as reply type byte", byte)); sdsfree(byte); return -1; } diff --git a/net.c b/net.c index 599ba9d..bdd191f 100644 --- a/net.c +++ b/net.c @@ -114,7 +114,7 @@ int redisContextConnectTcp(redisContext *c, const char *addr, int port) { he = gethostbyname(addr); if (he == NULL) { __redisSetError(c,REDIS_ERR_OTHER, - sdscatprintf(sdsempty(),"can't resolve: %s",addr)); + sdscatprintf(sdsempty(),"Can't resolve: %s",addr)); close(s); return REDIS_ERR; } diff --git a/test.c b/test.c index dd9d92f..beccd60 100644 --- a/test.c +++ b/test.c @@ -99,7 +99,7 @@ static void test_blocking_connection() { test("Returns error when host cannot be resolved: "); c = redisConnect((char*)"idontexist.local", 6379); test_cond(c->err == REDIS_ERR_OTHER && - strcmp(c->errstr,"can't resolve: idontexist.local") == 0); + strcmp(c->errstr,"Can't resolve: idontexist.local") == 0); redisFree(c); test("Returns error when the port is not open: "); @@ -240,7 +240,7 @@ static void test_reply_reader() { ret = redisReplyReaderGetReply(reader,NULL); err = redisReplyReaderGetError(reader); test_cond(ret == REDIS_ERR && - strcasecmp(err,"protocol error, got \"@\" as reply type byte") == 0); + strcasecmp(err,"Protocol error, got \"@\" as reply type byte") == 0); redisReplyReaderFree(reader); /* when the reply already contains multiple items, they must be free'd @@ -253,7 +253,7 @@ static void test_reply_reader() { ret = redisReplyReaderGetReply(reader,NULL); err = redisReplyReaderGetError(reader); test_cond(ret == REDIS_ERR && - strcasecmp(err,"protocol error, got \"@\" as reply type byte") == 0); + strcasecmp(err,"Protocol error, got \"@\" as reply type byte") == 0); redisReplyReaderFree(reader); test("Works with NULL functions for reply: "); -- cgit v1.2.3