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:
Josh Durgin 2013-10-24 09:47:16 -07:00
parent f9a6d71904
commit cfe845115b

View File

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