Page MenuHomeFreeBSD

usr.sbin/ndp: small fixes

Authored by garga on Jun 9 2017, 6:00 PM.




  • Constify rtpref_str declaration
  • Remove unused h_errno declaration
  • Use time_t type for expire
  • Use strlcpy to set static "?" value to ifname
  • Rename local variable 's' to stop shadowing global definition
  • Close socket used in pfx_flush()
  • Use local variables for sock() in setdefif() and getdefif()
  • Increase WARNS to 3

Diff Detail

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 18759
Build 18434: arc lint + arc unit

Event Timeline

garga created this revision.Jun 9 2017, 6:00 PM
garga retitled this revision from usr.sbin/ntp: small fixes to usr.sbin/ndp: small fixes.Jun 9 2017, 6:19 PM
kevans added inline comments.Aug 9 2018, 8:19 PM

You might as well change this to ifname == NULL while you're touching the area, since ifname is actually a pointer.


ifname is actually NULL here, so the strlcpy dest and size should be of ifix_buf (and set ifname = ifix_buf)

garga updated this revision to Diff 46613.Aug 13 2018, 11:34 AM

Address @kevans comments

garga updated this revision to Diff 46614.Aug 13 2018, 11:35 AM

Fixed reversed check

allanjude accepted this revision.Aug 21 2018, 4:59 PM

Approved By: allanjude

This revision is now accepted and ready to land.Aug 21 2018, 4:59 PM
This revision was automatically updated to reflect the committed changes.