redis-cli: collapse userinfo ternaries onto single lines

Apply review suggestions to keep the user/auth percentDecode ternaries
on one line each.
This commit is contained in:
wlswo 2026-05-26 15:03:45 +09:00
parent d946ad8845
commit 4ea058efa9

View file

@ -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;