tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b0b943a1613e2f9b421a663a3bf84fb4bbdbadc5
parent df503f464efcbfaf2755092ad1ad450a85217e0d
Author: David Goulet <dgoulet@torproject.org>
Date:   Thu,  8 Feb 2024 19:41:22 +0000

Merge branch 'bug40911' into 'main'

Make two 1-bit fields unsigned

Closes #40911

See merge request tpo/core/tor!796
Diffstat:
Achanges/bug40911 | 5+++++
Msrc/core/or/half_edge_st.h | 4++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/changes/bug40911 b/changes/bug40911 @@ -0,0 +1,5 @@ + o Minor bugfixes (compiler warnings): + - Make sure the two bitfields in the half-closed edge struct are + unsigned, as we're using them for boolean values and assign 1 to + them. Fixes bug 40911; bugfix on 0.4.7.2-alpha. + diff --git a/src/core/or/half_edge_st.h b/src/core/or/half_edge_st.h @@ -41,10 +41,10 @@ typedef struct half_edge_t { /** * Did this edge use congestion control? If so, use * timer instead of pending data approach */ - int used_ccontrol : 1; + unsigned int used_ccontrol : 1; /** Is there a connected cell pending? */ - int connected_pending : 1; + unsigned int connected_pending : 1; } half_edge_t; #endif /* !defined(HALF_EDGE_ST_H) */