From d11724260f6d50bbadb1c9e76c89b010d88f7178 Mon Sep 17 00:00:00 2001 From: michael-grunder Date: Wed, 17 Oct 2018 05:14:02 -0700 Subject: Simplify short-circuit logic --- cluster_library.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cluster_library.c') diff --git a/cluster_library.c b/cluster_library.c index 2d0cc996..2159a2e6 100644 --- a/cluster_library.c +++ b/cluster_library.c @@ -1421,7 +1421,7 @@ PHP_REDIS_API short cluster_send_command(redisCluster *c, short slot, const char /* Check response and short-circuit on success or communication error */ resp = cluster_check_response(c, &c->reply_type TSRMLS_CC); - if (resp == 0 || resp == -1) { + if (resp <= 0) { break; } -- cgit v1.2.3