Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d117242

Browse files
Simplify short-circuit logic
1 parent 07ef7f4 commit d117242

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cluster_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ PHP_REDIS_API short cluster_send_command(redisCluster *c, short slot, const char
14211421

14221422
/* Check response and short-circuit on success or communication error */
14231423
resp = cluster_check_response(c, &c->reply_type TSRMLS_CC);
1424-
if (resp == 0 || resp == -1) {
1424+
if (resp <= 0) {
14251425
break;
14261426
}
14271427

0 commit comments

Comments
 (0)