summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deps/hiredis/hiredis.c1
-rw-r--r--src/redis-cli.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/deps/hiredis/hiredis.c b/deps/hiredis/hiredis.c
index f0d78a0da..898b4d6af 100644
--- a/deps/hiredis/hiredis.c
+++ b/deps/hiredis/hiredis.c
@@ -664,6 +664,7 @@ void __redisSetError(redisContext *c, int type, const sds errstr) {
static redisContext *redisContextInit() {
redisContext *c = calloc(sizeof(redisContext),1);
+ c->fd = -1; /* quick fix for a bug that should be addressed differently */
c->err = 0;
c->errstr = NULL;
c->obuf = sdsempty();
diff --git a/src/redis-cli.c b/src/redis-cli.c
index f59a1b851..09ab9189f 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -412,7 +412,7 @@ static void repl() {
sds *argv;
config.interactive = 1;
- while((line = linenoise("redis> ")) != NULL) {
+ while((line = linenoise(context ? "redis> " : "not connected> ")) != NULL) {
if (line[0] != '\0') {
argv = sdssplitargs(line,&argc);
linenoiseHistoryAdd(line);