From: Yehuda Sadeh Date: Tue, 12 Dec 2017 12:25:16 +0000 (-0800) Subject: rgw: rgw_str_to_bool() should also accept "true" X-Git-Tag: v13.1.0~270^2~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=297a1b725b72c61bb10ec698d9fcae134d4a8ea1;p=ceph.git rgw: rgw_str_to_bool() should also accept "true" Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 8cd71a276a51..520fc2bf0e0b 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -2186,7 +2186,8 @@ static inline int rgw_str_to_bool(const char *s, int def_val) if (!s) return def_val; - return (strcasecmp(s, "on") == 0 || + return (strcasecmp(s, "true") == 0 || + strcasecmp(s, "on") == 0 || strcasecmp(s, "yes") == 0 || strcasecmp(s, "1") == 0); }