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)
Mon, Apr 8, 8:30 PM
Unknown Object (File)
Fri, Apr 5, 3:25 AM
Unknown Object (File)
Jan 27 2024, 10:47 AM
Unknown Object (File)
Jan 27 2024, 10:47 AM
Unknown Object (File)
Jan 22 2024, 6:49 PM
Unknown Object (File)
Jan 11 2024, 5:00 AM
Unknown Object (File)
Dec 20 2023, 4:05 AM
Unknown Object (File)
Dec 11 2023, 3:41 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.