From: Josh Durgin Date: Thu, 24 Oct 2013 16:47:16 +0000 (-0700) Subject: rgw: eliminate one unnecessary case statement X-Git-Tag: v0.72-rc1~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cfe845115bccf574e607899014cdbf2d213c6fb0;p=ceph.git 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 --- diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index e51b08889cb9..cb87c18b93d7 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -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: