From 814be4f5bd62b4f66281879b3035a20ad84bb498 Mon Sep 17 00:00:00 2001 From: Henri Doreau Date: Tue, 22 Jan 2013 10:16:30 +0100 Subject: Made connect functions return NULL on alloc failures. Updated documentation and examples accordingly. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 62fe106..8d788f2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ After trying to connect to Redis using `redisConnect` you should check the `err` field to see if establishing the connection was successful: redisContext *c = redisConnect("127.0.0.1", 6379); - if (c->err) { + if (c != NULL && c->err) { printf("Error: %s\n", c->errstr); // handle error } -- cgit v1.2.3