Tidy up a bunch of places that have the same duplicated logic. Simplify
callers of in6_init_prefix_ltimes(). No functional change intended.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 69664 Build 66547: arc lint + arc unit
Event Timeline
Comment Actions
LGTM. Why don't you inline it? I know that the compiler will do ultimately what it wants. but at least we can suggest the right thing to it.
Comment Actions
The function is used in multiple compilation units, so to make it inline the definition would have to be in a header, probably nd6.h since that's where ND6_INFINITE_LIFETIME is defined.
We could put it there, but I don't see much of a reason: this code is only used in control paths and is definitely not performance-sensitive. And since the helper references the global time_uptime, we'd have to pull in time.h, which feels like overkill to me.
So I did the simpler thing and just defined it in in6.c.