git: ifconfig(8): Use atexit() to ensure printing interface name

Aaron LI aly at crater.dragonflybsd.org
Sat Aug 4 18:49:42 PDT 2018


commit e9e1626f77881d1971173b83792c178b084ff759
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Jun 22 21:23:25 2018 +0800

    ifconfig(8): Use atexit() to ensure printing interface name
    
    The ifconfig program may not exit at the end of its main() function,
    so use atexit(printifnamemaybe) to ensure the interface name (e.g.,
    newly cloned but with wildcard name) is printed on exit.
    (Taken from FreeBSD)
    
    Use "return (0)" instead of "exit(0)" in the main() function.
    
    Minor whitespace updates.

Summary of changes:
 sbin/ifconfig/ifconfig.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e9e1626f77881d1971173b83792c178b084ff759


-- 
DragonFly BSD source repository


More information about the Commits mailing list