HomeFreeBSD

Address feedback from hrs@ re: r301059 (ifconfig subnet mask)

Description

Address feedback from hrs@ re: r301059 (ifconfig subnet mask)

  • Use NI_MAXHOST to size buffers for getnameinfo()
  • remove non-standard 'full' inet6 address printing
  • remove 'no scope' option
  • use strchr(3) to optimize replacing separator character in lladdrs

Reviewed by: gnn, jhb
Differential Revision: https://reviews.freebsd.org/D2856

Details

Provenance
allanjudeAuthored on
Reviewer
gnn
Differential Revision
D2856: make ifconfig print ipv4 netmasks in dotted-quad notation, rather than hex
Parents
rS301184: MFC r300758:
Branches
Unknown
Tags
Unknown

Event Timeline

Minor cleanup suggestion.

/head/sbin/ifconfig/af_link.c
72

This actually should be format_char = strchr(format_char, ':'), although the final result is correct.
In addition, a while loop likes while ((format_char = strchr(format_char, ':') != NULL) would be more concise.