summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-15 10:46:24 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-15 10:46:26 -0400
commit796e36e535d1713fd1168772669199ea9189ba61 (patch)
tree5c852ff008e8cc48eccb96783786b906ae08d86e /src/or
parentdff7d3d00ad5e3f9e59cd4b11f302601790d1061 (diff)
downloadtor-796e36e535d1713fd1168772669199ea9189ba61.tar.gz
tor-796e36e535d1713fd1168772669199ea9189ba61.zip
Adjust tor_assert_unreached()
This version of the macro makes it obvious to the compiler that "tor_assert_unreached()" will always abort().
Diffstat (limited to 'src/or')
-rw-r--r--src/or/hs_common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index 10b56c0baa..e586516c80 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -523,7 +523,7 @@ rend_data_get_address(const rend_data_t *rend_data)
return TO_REND_DATA_V2(rend_data)->onion_address;
default:
/* We should always have a supported version. */
- tor_assert(0);
+ tor_assert_unreached();
}
}
@@ -546,7 +546,7 @@ rend_data_get_desc_id(const rend_data_t *rend_data, uint8_t replica,
return TO_REND_DATA_V2(rend_data)->descriptor_id[replica];
default:
/* We should always have a supported version. */
- tor_assert(0);
+ tor_assert_unreached();
}
}
@@ -569,7 +569,7 @@ rend_data_get_pk_digest(const rend_data_t *rend_data, size_t *len_out)
}
default:
/* We should always have a supported version. */
- tor_assert(0);
+ tor_assert_unreached();
}
}
@@ -1814,4 +1814,3 @@ hs_inc_rdv_stream_counter(origin_circuit_t *circ)
tor_assert_nonfatal_unreached();
}
}
-