[tor-bugs] #20141 [Core Tor/Tor]: Extra closing bracket in non-gcc IF_BUG_ONCE_
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Sep 13 23:56:39 UTC 2016
#20141: Extra closing bracket in non-gcc IF_BUG_ONCE_
------------------------------+------------------------------------
Reporter: teor | Owner:
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.2.???
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: 029-proposed, backport
Actual Points: | Parent ID:
Points: 0.1 | Reviewer:
Sponsor: |
------------------------------+------------------------------------
The 'IF_BUG_ONCE__' for non-gcc is wrong. A simple patch:
{{{
--- a/util_bug.h 2016-09-13 10:44:59
+++ b/util_bug.h 2016-09-08 20:24:45
@@ -117,7 +117,7 @@
#else
#define IF_BUG_ONCE__(cond,var) \
static int var = 0; \
- if (PREDICT_UNLIKELY(cond)) ? \
+ if (PREDICT_UNLIKELY(cond) ? \
(var ? 1 : \
(var=1, \
tor_bug_occurred_(SHORT_FILE__, __LINE__, __func__, \
}}}
Credit to Gisle Vanem, from this tor-dev post:
https://lists.torproject.org/pipermail/tor-dev/2016-September/011393.html
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20141>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list