]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_admin.cc: remove twice check for 'object'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 14:52:34 +0000 (15:52 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 14:52:34 +0000 (15:52 +0100)
Remove twice checked 'object'. Put checks in alphabetic order to make
double checks easier to catch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_admin.cc

index 2095238874aa14806aad20b3c6c173fbfa306f13..7a1fe73ae6e77f723479393a084d9c53ad1164c0 100644 (file)
@@ -226,21 +226,20 @@ static void perm_to_str(uint32_t mask, char *buf, int len)
 static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
 {
   *need_more = false;
-  if (strcmp(cmd, "user") == 0 ||
-      strcmp(cmd, "subuser") == 0 ||
-      strcmp(cmd, "key") == 0 ||
+  if (strcmp(cmd, "bucket") == 0 ||
       strcmp(cmd, "buckets") == 0 ||
-      strcmp(cmd, "bucket") == 0 ||
+      strcmp(cmd, "caps") == 0 ||
+      strcmp(cmd, "cluster") == 0 ||
+      strcmp(cmd, "gc") == 0 || 
+      strcmp(cmd, "key") == 0 ||
+      strcmp(cmd, "log") == 0 ||
       strcmp(cmd, "object") == 0 ||
       strcmp(cmd, "pool") == 0 ||
       strcmp(cmd, "pools") == 0 ||
-      strcmp(cmd, "log") == 0 ||
-      strcmp(cmd, "usage") == 0 ||
-      strcmp(cmd, "object") == 0 ||
-      strcmp(cmd, "cluster") == 0 ||
+      strcmp(cmd, "subuser") == 0 ||
       strcmp(cmd, "temp") == 0 ||
-      strcmp(cmd, "caps") == 0 ||
-      strcmp(cmd, "gc") == 0) {
+      strcmp(cmd, "usage") == 0 ||
+      strcmp(cmd, "user") == 0) {
     *need_more = true;
     return 0;
   }