]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGMonitor.cc: add parenthesis around expression
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 15:13:09 +0000 (16:13 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 15:13:09 +0000 (16:13 +0100)
Add parenthesis around expressions like (x && y & z).

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

index 14f3e4ba9d70beb198e66e891e0f30d1d50afeca..c793092bb623d0a6c82ecfd3f2398c84b3341326 100644 (file)
@@ -1310,7 +1310,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
       for (hash_map<pg_t,pg_stat_t>::const_iterator p = pg_map.pg_stat.begin();
           p != pg_map.pg_stat.end();
           ++p) {
-       if (p->second.state & (PG_STATE_STALE |
+       if ((p->second.state & (PG_STATE_STALE |
                               PG_STATE_DOWN |
                               PG_STATE_DEGRADED |
                               PG_STATE_INCONSISTENT |
@@ -1322,7 +1322,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
                               PG_STATE_INCOMPLETE |
                               PG_STATE_BACKFILL_WAIT |
                               PG_STATE_BACKFILL |
-                              PG_STATE_BACKFILL_TOOFULL) &&
+                              PG_STATE_BACKFILL_TOOFULL)) &&
            stuck_pgs.count(p->first) == 0) {
          ostringstream ss;
          ss << "pg " << p->first << " is " << pg_state_string(p->second.state);