summaryrefslogtreecommitdiffstats
path: root/sbin/dumpfs/dumpfs.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-06-24 15:03:06 +0000
committeriedowse <iedowse@FreeBSD.org>2001-06-24 15:03:06 +0000
commited4e834f6e150db1ccd52fb6bd1214f33e8ed2bf (patch)
treea8ff40b4dff2a6c63ac045362a9686043d798e16 /sbin/dumpfs/dumpfs.c
parent606d517ceaaca748519b0832af0b28162169655d (diff)
downloadFreeBSD-src-ed4e834f6e150db1ccd52fb6bd1214f33e8ed2bf.zip
FreeBSD-src-ed4e834f6e150db1ccd52fb6bd1214f33e8ed2bf.tar.gz
Clean up the addrmerge() function, which was over-complicated and
contained a number of memory leaks. The changes include: - Add a comment describing what addrmerge() does. - Deal with 0.0.0.0./::. or AF_LOCAL callers correctly. - Use rpcbind_get_conf() instead of getnetconfigent() so we don't have to remember to free the returned netconfig struct. - Make just one pass through the ifaddrs list; we can pick up a fallback interface address in the same pass as the netmask comparison. - Define and use SA2SIN* macros to avoid the need for loads of protocol-specific local variables. - Use mostly protocol-independent code for building the netbuf version of the address to be returned. - Use the common cleanup code for virtually all error and non-error cases, fixing a number of memory leaks.
Diffstat (limited to 'sbin/dumpfs/dumpfs.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud