CID 716876: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
At (1): pgid.parse(test_map_pg.c_str()) < 0 is always false regardless of the values of its operands. This occurs as the logical operand of if.
Signed-off-by: Sage Weil <sage@inktank.com>
}
if (!test_map_pg.empty()) {
pg_t pgid;
- if (pgid.parse(test_map_pg.c_str()) < 0) {
+ if (!pgid.parse(test_map_pg.c_str())) {
cerr << me << ": failed to parse pg '" << test_map_pg
<< "', r = " << r << std::endl;
usage();