From 4ea058efa9beb716ca0fbe2435e2be72fc55cc01 Mon Sep 17 00:00:00 2001 From: wlswo Date: Tue, 26 May 2026 15:03:45 +0900 Subject: [PATCH] redis-cli: collapse userinfo ternaries onto single lines Apply review suggestions to keep the user/auth percentDecode ternaries on one line each. --- src/cli_common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cli_common.c b/src/cli_common.c index c280707cd..6941ee1b3 100644 --- a/src/cli_common.c +++ b/src/cli_common.c @@ -331,13 +331,11 @@ void parseRedisUri(const char *uri, const char* tool_name, cliConnInfo *connInfo * entirely (empty password) instead of sending an empty ACL * component, which the server rejects. */ sdsfree(connInfo->user); - connInfo->user = (username > curr) - ? percentDecode(curr, username - curr) : NULL; + connInfo->user = (username > curr) ? percentDecode(curr, username - curr) : NULL; curr = username + 1; } sdsfree(connInfo->auth); - connInfo->auth = (userinfo > curr) - ? percentDecode(curr, userinfo - curr) : NULL; + connInfo->auth = (userinfo > curr) ? percentDecode(curr, userinfo - curr) : NULL; curr = userinfo + 1; } if (curr == end) return;