[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Add braces to IF_BUG_ONCE()s introduced in ticket34069.
commit c5707d6cf0d3009655ce4681a228c8d2767a9063
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Jul 2 11:55:18 2020 -0400
Add braces to IF_BUG_ONCE()s introduced in ticket34069.
---
src/core/or/extendinfo.c | 6 ++++--
src/feature/client/bridges.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/core/or/extendinfo.c b/src/core/or/extendinfo.c
index e4aec634a..bcdb57d5a 100644
--- a/src/core/or/extendinfo.c
+++ b/src/core/or/extendinfo.c
@@ -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) &&
diff --git a/src/feature/client/bridges.c b/src/feature/client/bridges.c
index 3a3d1bb68..caa477649 100644
--- a/src/feature/client/bridges.c
+++ b/src/feature/client/bridges.c
@@ -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));
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits