Opened 2 years ago

Last modified 2 years ago

#27661 new defect

use C99 bool from stdbool.h instead of int everywhere

Reported by: cyberpunks Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: coccinelle, tor-client, technical-debt, c99
Cc: mcs, teor, ahf, catalyst Actual Points:
Parent ID: #13260 Points:
Reviewer: Sponsor:


Child Tickets

Change History (2)

comment:1 Changed 2 years ago 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).

comment:2 Changed 2 years ago by nickm

I'm fine with returning a bool from functions that are logically boolean, but we shouldn't change the convention for functions where "0" indicates success and "-1" indicates an error.

Note: See TracTickets for help on using tickets.