chore: mark *Static.c pool helpers static inline#409
Conversation
CodeRabbit nit on S11.07 flagged that IndexFromHandle and CleanupAtIndex in SolidSyslogWinsockResolverStatic.c should be static inline per CLAUDE.md's helper-placement rule. The rule applies to the whole *Static.c family and the inconsistency had drifted across S11.01, S11.04, S11.05, S11.06, and S11.07 (23 files in total). Mechanical sweep: each affected helper's forward declaration and definition gain the inline keyword. Both are tiny mechanical helpers (5- and 3-liners) — natural inline candidates. Placement is unchanged (they were already defined immediately beneath _Destroy, the first caller of both). Out of scope: the handful of larger *Static.c helpers (BlockStore's ResolveSecurityPolicy / BuildBlockSequenceConfig, the IsValidConfig trio in MetaSd / SwitchingSender / UdpSender) carry real branching logic and are not inline candidates. Their placement at file end is a separate concern. No behaviour change. MSVC build + full 1131-test suite green locally.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1263 passed, 🙈 2 skipped) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Purpose
Mechanical sweep across every
*Static.cfile in the tree (23 files, Core + Posix + Windows) to mark the two pool helpers —IndexFromHandleandCleanupAtIndex—static inlinerather than plainstatic. Both forward declaration and definition pick up theinlinekeyword in the same line edit.The rule comes from CLAUDE.md:
CodeRabbit flagged the omission on S11.07's
SolidSyslogWinsockResolverStatic.c(PR #408 comment) but the inconsistency had drifted across the whole family — S11.01 / S11.04 / S11.05 / S11.06 / S11.07 — so fixing only S11.07 would leave the family lopsided. One-shot sweep across the lot.Change Description
Per-file diff is 4 lines (two forward decls + two definitions). 23 files × 4 lines = 92 keyword insertions. No behaviour change.
Both helpers are textbook inline candidates:
IndexFromHandleis a 5-linefor-loop reverse lookup;CleanupAtIndexis a 3-line bridge that calls the per-class_Cleanup. The compiler will still emit an out-of-line copy ofCleanupAtIndexbecause its address is taken bySolidSyslogPoolAllocator_FreeIfInUse— that's expected and harmless.Out of scope
The handful of larger
*Static.chelpers —BlockStore_ResolveSecurityPolicy,BlockStore_BuildBlockSequenceConfig,MetaSd_IsValidConfig,SwitchingSender_IsValidConfig,UdpSender_IsValidConfig— carry real branching logic and are not inline candidates. Their placement at file end (rather than immediately beneath_Create, their first caller) is a separate placement-rule violation; deferring to a future cleanup so this PR stays narrow.Verification
msvc-debug(local): full build clean, all 1131 tests pass.