Skip to content

Commit

Permalink
Merge "Convert pointer to bool correctly"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 12, 2016
2 parents dac7c37 + 88369ba commit 1cfc80a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/bgp/ermvpn/ermvpn_route.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,12 @@ bool ErmVpnRoute::IsValid() const {
const BgpAttr *attr = BestPath()->GetAttr();
switch (prefix_.type()) {
case ErmVpnPrefix::NativeRoute:
return attr->label_block();
break;
return attr->label_block().get() != NULL;
case ErmVpnPrefix::LocalTreeRoute:
return attr->edge_discovery();
break;
return attr->edge_discovery() != NULL;
case ErmVpnPrefix::GlobalTreeRoute:
return attr->edge_forwarding();
break;
default:
return attr->edge_forwarding() != NULL;
case ErmVpnPrefix::Invalid:
break;
}

Expand Down

0 comments on commit 1cfc80a

Please sign in to comment.