Page MenuHomeFreeBSD

usr.sbin/ndp: small fixes
ClosedPublic

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

Details

Summary

usr.sbin/ndp:

  • 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

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 18758
Build 18433: 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
usr.sbin/ndp/ndp.c
671–672

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

672–675

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.