mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add braces to IF_BUG_ONCE()s introduced in ticket34069.
This commit is contained in:
committed by
David Goulet
parent
873d6d3724
commit
c5707d6cf0
@@ -240,8 +240,9 @@ bool
|
||||
extend_info_has_orport(const extend_info_t *ei,
|
||||
const tor_addr_t *addr, uint16_t port)
|
||||
{
|
||||
IF_BUG_ONCE(ei == NULL)
|
||||
IF_BUG_ONCE(ei == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < EXTEND_INFO_MAX_ADDRS; ++i) {
|
||||
const tor_addr_port_t *ei_ap = &ei->orports[i];
|
||||
@@ -291,8 +292,9 @@ extend_info_pick_orport(const extend_info_t *ei)
|
||||
bool
|
||||
extend_info_any_orport_addr_is_internal(const extend_info_t *ei)
|
||||
{
|
||||
IF_BUG_ONCE(ei == NULL)
|
||||
IF_BUG_ONCE(ei == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < EXTEND_INFO_MAX_ADDRS; ++i) {
|
||||
if (! tor_addr_is_unspec(&ei->orports[i].addr) &&
|
||||
|
||||
@@ -273,8 +273,9 @@ extend_info_is_a_configured_bridge(const extend_info_t *ei)
|
||||
ap1 = &ei->orports[0];
|
||||
if (! tor_addr_is_null(&ei->orports[1].addr))
|
||||
ap2 = &ei->orports[1];
|
||||
IF_BUG_ONCE(ap1 == NULL)
|
||||
IF_BUG_ONCE(ap1 == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return addr_is_a_configured_bridge(&ap1->addr, ap1->port, digest) &&
|
||||
(ap2 == NULL ||
|
||||
addr_is_a_configured_bridge(&ap2->addr, ap2->port, digest));
|
||||
|
||||
Reference in New Issue
Block a user