]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: test_flag returns bool 5470/head
authorSage Weil <sage@redhat.com>
Mon, 17 Aug 2015 14:29:48 +0000 (10:29 -0400)
committerSage Weil <sage@redhat.com>
Mon, 17 Aug 2015 14:30:32 +0000 (10:30 -0400)
Otherwise comparing the result to a bool will promote the bool to
an int and fail the comparison.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSDMap.h

index 3e75995da10e881a11cd599a1630a497a64d26f9..e1d140adf0e35c838e9f032339ab803feed8cf61 100644 (file)
@@ -341,7 +341,7 @@ public:
   }
 
   int get_flags() const { return flags; }
-  int test_flag(int f) const { return flags & f; }
+  bool test_flag(int f) const { return flags & f; }
   void set_flag(int f) { flags |= f; }
   void clear_flag(int f) { flags &= ~f; }