summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-07-13 13:40:54 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-07-16 14:18:46 +0200
commita937a12d4e7d1c7785c983592c709b1e118c4ce2 (patch)
tree62391b85589a5949ac01e4867a17ea2c8b25c6bc
parent5ea4c5e1cac874c3a01648cef2f58b52cf40afc7 (diff)
downloadceph-a937a12d4e7d1c7785c983592c709b1e118c4ce2.tar.gz
rgw_admin.cc: fix same expression on both sides of '||'
Remove twice listed checks, get checks in alphabetical order, added comment above the checks to point out to keep it in alphabetical order to avoid double checks. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r--src/rgw/rgw_admin.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index 0b7cb143400..ced3a6a2246 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -234,32 +234,31 @@ enum {
static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
{
*need_more = false;
- if (strcmp(cmd, "bucket") == 0 ||
+ // NOTE: please keep the checks in alphabetical order !!!
+ if (strcmp(cmd, "bilog") == 0 ||
+ strcmp(cmd, "bucket") == 0 ||
strcmp(cmd, "buckets") == 0 ||
- strcmp(cmd, "user") == 0 ||
strcmp(cmd, "caps") == 0 ||
+ strcmp(cmd, "datalog") == 0 ||
strcmp(cmd, "gc") == 0 ||
strcmp(cmd, "key") == 0 ||
strcmp(cmd, "log") == 0 ||
+ strcmp(cmd, "mdlog") == 0 ||
+ strcmp(cmd, "metadata") == 0 ||
strcmp(cmd, "object") == 0 ||
+ strcmp(cmd, "opstate") == 0 ||
strcmp(cmd, "pool") == 0 ||
strcmp(cmd, "pools") == 0 ||
- strcmp(cmd, "subuser") == 0 ||
- strcmp(cmd, "temp") == 0 ||
- strcmp(cmd, "usage") == 0 ||
- strcmp(cmd, "user") == 0 ||
strcmp(cmd, "region") == 0 ||
strcmp(cmd, "regions") == 0 ||
strcmp(cmd, "region-map") == 0 ||
strcmp(cmd, "regionmap") == 0 ||
- strcmp(cmd, "zone") == 0 ||
+ strcmp(cmd, "replicalog") == 0 ||
+ strcmp(cmd, "subuser") == 0 ||
strcmp(cmd, "temp") == 0 ||
- strcmp(cmd, "metadata") == 0 ||
- strcmp(cmd, "mdlog") == 0 ||
- strcmp(cmd, "bilog") == 0 ||
- strcmp(cmd, "datalog") == 0 ||
- strcmp(cmd, "opstate") == 0 ||
- strcmp(cmd, "replicalog") == 0) {
+ strcmp(cmd, "usage") == 0 ||
+ strcmp(cmd, "user") == 0 ||
+ strcmp(cmd, "zone") == 0) {
*need_more = true;
return 0;
}