diff options
author | miter <Miterv@163.com> | 2017-01-26 21:36:26 +0900 |
---|---|---|
committer | miter <Miterv@163.com> | 2017-01-26 21:36:26 +0900 |
commit | 3ec1a001fbc11b54c0231f9c58384eb53ca3802e (patch) | |
tree | d4e17052b314c900fe8e87ac355441607e698f3b | |
parent | 41d16f7a4a6848be304e0b4433bd5683caf27338 (diff) | |
download | redis-3ec1a001fbc11b54c0231f9c58384eb53ca3802e.tar.gz |
Change switch statment to if statment
-rw-r--r-- | src/object.c | 6 |
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"); } } |