[tor-bugs] #27661 [Core Tor/Tor]: use C99 bool from stdbool.h instead of int everywhere
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Sep 14 01:10:56 UTC 2018
#27661: use C99 bool from stdbool.h instead of int everywhere
-------------------------------------------------+-------------------------
Reporter: cyberpunks | Owner: (none)
Type: defect | Status: new
Priority: Medium | Milestone: Tor:
| unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: coccinelle, tor-client, technical- | Actual Points:
debt, c99 |
Parent ID: #13260 | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
When returning a boolean from a function, bool is the best we can do.
In a struct, a 1-bit field is better (`unsigned int foo : 1`).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27661#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list