Page MenuHomeFreeBSD

libalias: replace placeholder with static constant
ClosedPublic

Authored by donner on May 13 2021, 9:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 8, 12:10 PM
Unknown Object (File)
Wed, Jan 8, 12:08 PM
Unknown Object (File)
Wed, Jan 8, 11:59 AM
Unknown Object (File)
Wed, Jan 8, 11:11 AM
Unknown Object (File)
Tue, Jan 7, 6:59 PM
Unknown Object (File)
Tue, Jan 7, 12:08 PM
Unknown Object (File)
Thu, Dec 26, 10:55 AM
Unknown Object (File)
Tue, Dec 24, 10:08 AM

Details

Summary

The field nullAddress in struct libalias is never set and never used.
It exists as a placeholder for an unused argument only.

Test Plan

Just recompile everything.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39188
Build 36077: arc lint + arc unit

Event Timeline

sys/netinet/libalias/alias_db.c
227

Should it be:
static const struct in_addr ???

  • Silence warning about non-static declaration.
donner added inline comments.
sys/netinet/libalias/alias_db.c
227

The compiler had the same question. Thank you for spotting this.

sys/netinet/libalias/alias_db.c
229

Should you also add "const" keyword here?

donner marked an inline comment as done.
  • Make it const.

Rebased to D30259

sys/netinet/libalias/alias_db.c
229

You are right. Added const.

This revision is now accepted and ready to land.May 14 2021, 2:16 PM
This revision was automatically updated to reflect the committed changes.
donner marked an inline comment as done.