git: a6094f844a82 - main - ifconfig: remove 'newaddr' global variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Jun 2023 09:16:22 UTC
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a6094f844a829832cabdf3019993adcf6a083383 commit a6094f844a829832cabdf3019993adcf6a083383 Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2023-06-14 07:51:27 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2023-06-14 09:16:09 +0000 ifconfig: remove 'newaddr' global variable Differential Revision: https://reviews.freebsd.org/D40441 MFC after: 2 weeks --- sbin/ifconfig/af_inet6.c | 4 ---- sbin/ifconfig/ifconfig.c | 2 +- sbin/ifconfig/ifconfig.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 7a771a885412..f1755bcb7a16 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -433,8 +433,6 @@ in6_getaddr(const char *addr_str, int which) { struct in6_px *px = sin6tab_nl[which]; - newaddr &= 1; - px->set = true; px->plen = 128; if (which == ADDR) { @@ -546,8 +544,6 @@ in6_getaddr(const char *s, int which) struct addrinfo hints, *res; int error = -1; - newaddr &= 1; - sin->sin6_len = sizeof(*sin); if (which != MASK) sin->sin6_family = AF_INET6; diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 4f1d95c43a63..e0aae77a317e 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -101,7 +101,7 @@ static int setaddr; static int setmask; static int doalias; static int clearaddr; -int newaddr = 1; +static int newaddr = 1; int exit_code = 0; diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h index a65969ab4c56..9747c125746c 100644 --- a/sbin/ifconfig/ifconfig.h +++ b/sbin/ifconfig/ifconfig.h @@ -252,7 +252,6 @@ void opt_register(struct option *); extern ifconfig_handle_t *lifh; extern struct ifreq ifr; extern int allmedia; -extern int newaddr; extern int exit_code; extern char *f_inet, *f_inet6, *f_ether, *f_addr;