summaryrefslogtreecommitdiff
path: root/libevent-example.c
diff options
context:
space:
mode:
Diffstat (limited to 'libevent-example.c')
-rw-r--r--libevent-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libevent-example.c b/libevent-example.c
index 19d4d16..ef68674 100644
--- a/libevent-example.c
+++ b/libevent-example.c
@@ -4,7 +4,7 @@
#include <hiredis/libevent.h>
#include <signal.h>
-void getCallback(redisContext *c, redisReply *reply, const void *privdata) {
+void getCallback(redisContext *c, redisReply *reply, void *privdata) {
printf("argv[%s]: %s\n", (const char*)privdata, reply->reply);
/* Disconnect after receiving the reply to GET */
@@ -23,7 +23,7 @@ int main (int argc, char **argv) {
if (c == NULL) return 1;
redisCommand(c, "SET key %b", argv[argc-1], strlen(argv[argc-1]));
- redisCommandWithCallback(c, getCallback, "end-1", "GET key");
+ redisCommandWithCallback(c, getCallback, (char*)"end-1", "GET key");
event_base_dispatch(base);
redisFree(c);
return 0;