diff options
author | Henri Doreau <henri.doreau@cea.fr> | 2013-01-22 10:16:30 +0100 |
---|---|---|
committer | Henri Doreau <henri.doreau@cea.fr> | 2013-01-22 10:19:46 +0100 |
commit | 814be4f5bd62b4f66281879b3035a20ad84bb498 (patch) | |
tree | 4e23740ab761af60b4b21fafe33904d308d2089d /README.md | |
parent | 3c46b13a62164d9f3f99289476f84db7918aafc2 (diff) |
Made connect functions return NULL on alloc failures.
Updated documentation and examples accordingly.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 } |