summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2017-01-26 13:41:59 +0100
committerGitHub <noreply@github.com>2017-01-26 13:41:59 +0100
commit2e4f53a7111c92f2c297c396564ff02b6bf68bbf (patch)
treed4e17052b314c900fe8e87ac355441607e698f3b
parent41d16f7a4a6848be304e0b4433bd5683caf27338 (diff)
parent3ec1a001fbc11b54c0231f9c58384eb53ca3802e (diff)
downloadredis-2e4f53a7111c92f2c297c396564ff02b6bf68bbf.tar.gz
Merge pull request #3778 from MiterV1/unstable
Change switch statment to if statment
-rw-r--r--src/object.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/object.c b/src/object.c
index 125c1a595..90df9e38b 100644
--- a/src/object.c
+++ b/src/object.c
@@ -246,11 +246,9 @@ void freeStringObject(robj *o) {
}
void freeListObject(robj *o) {
- switch (o->encoding) {
- case OBJ_ENCODING_QUICKLIST:
+ if (o->encoding == OBJ_ENCODING_QUICKLIST) {
quicklistRelease(o->ptr);
- break;
- default:
+ } else {
serverPanic("Unknown list encoding type");
}
}