[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #5849 [Tor Relay]: Negative cell-processed-cells values
#5849: Negative cell-processed-cells values
-----------------------+----------------------------------------------------
Reporter: atagar | Owner:
Type: defect | Status: needs_review
Priority: minor | Milestone: Tor: 0.2.3.x-final
Component: Tor Relay | Version:
Keywords: | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
Comment(by nickm):
Found a task-5849-3, and looked at that instead.
Are those casts to uint64_t really necessary? They look like cargo-
cultism to me. In any binary operation between a uint64_t and a uint32_t,
the uint32_t should be promoted to uint64_t losslessly.
In any binary operation between a uint64_t and an int, the int will get
converted to a uint64_t anyway (with the possibility of undesirable
results if the int is negative). Maybe circs_in_share should be an
unsigned type.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5849#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs