[tor-bugs] #13260 [Core Tor/Tor]: Transform code to cleaner c99 style
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Jun 9 22:43:23 UTC 2017
#13260: Transform code to cleaner c99 style
-------------------------------------------------+-------------------------
Reporter: nickm | Owner:
Type: defect | Status: new
Priority: Low | Milestone: Tor:
| unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: coccinelle, tor-client technical- | Actual Points:
debt |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
Replying to [comment:8 ahf]:
> We should probably figure out what we want to do here:
>
> First two things I can think of:
>
> - Convert functions that returns 0 or 1 to return `bool`
(`true`/`false`) from `<stdbool.h>`?
We also want to make the crypto API return 0 and 1 rather than 0 and -1.
(I think there's a ticket for this already.)
Then we could convert it to use bool as well.
> - Lift `for` loop variables declarations into their loop initialiser?
>
> Additionally, It might be interesting to figure out when/if we can start
using `C11` features?
When all supported compilers on all supported OSs support C11 (or whatever
C11 features we want). Sometimes the Microsoft compilers are the slowest
here.
Are there any particular features you have in mind?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13260#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list