From fa789e6da1e0c27f76e261e3cc7e7ef97a8a3d03 Mon Sep 17 00:00:00 2001 From: Sarthak Aggarwal Date: Tue, 19 Nov 2024 22:01:10 -0800 Subject: [PATCH] addressing comments Signed-off-by: Sarthak Aggarwal --- src/t_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_string.c b/src/t_string.c index a92f25aeae..730ba06447 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -108,7 +108,7 @@ void setGenericCommand(client *c, if (flags & OBJ_SET_IFEQ && found) { robj *current_value = lookupKeyRead(c->db, key); - if (current_value == NULL || current_value->type != OBJ_STRING || checkType(c, comparison, OBJ_STRING) != 0) { + if (checkType(c, current_value, OBJ_STRING) != 0) { if (!(flags & OBJ_SET_GET)) { addReplyError(c, "value(s) must be present or string"); }