mirror of
https://github.com/ceph/ceph
synced 2024-12-15 16:07:00 +00:00
rgw: eliminate one unnecessary case statement
0x21 '!' is the first character that doesn't need encoding, so we can expand the lower bound check. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
f9a6d71904
commit
cfe845115b
@ -714,11 +714,10 @@ static void escape_char(char c, string& dst)
|
||||
|
||||
static bool char_needs_url_encoding(char c)
|
||||
{
|
||||
if (c < 0x20 || c >= 0x7f)
|
||||
if (c <= 0x20 || c >= 0x7f)
|
||||
return true;
|
||||
|
||||
switch (c) {
|
||||
case 0x20:
|
||||
case 0x22:
|
||||
case 0x23:
|
||||
case 0x25:
|
||||
|
Loading…
Reference in New Issue
Block a user