MINOR: ring: rename totlen vs msglen in ring_write()
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Feb 2024 19:03:20 +0000 (20:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commitee1c92cf1026c0bf4a87393afa50966485111000
tree65bb1443aa5e48f3ee474b17824a6e0b69d733a9
parentc222cb83890415608b66097575ff2268db2c4cc2
MINOR: ring: rename totlen vs msglen in ring_write()

The ring_write() function uses confusing variable names: totlen is in
fact the length of the message, not the total length that is going to
be written. Let's rename it msglen and have a real "needed" that
corresponds to the total size we're going to write. We also add a
BUG_ON_HOT() to catch mistakes causing discrepancies.
src/ring.c