From 8b565df63c67e88a214a860e78d352dc0d081805 Mon Sep 17 00:00:00 2001 From: miter Date: Thu, 26 Jan 2017 21:36:26 +0900 Subject: [PATCH] Change switch statment to if statment --- src/object.c | 6 ++---- 1 file 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"); } }