mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
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:
parent
d946ad8845
commit
4ea058efa9
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue