ifconfig: remove 'newaddr' global variable

Differential Revision: https://reviews.freebsd.org/D40441
MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2023-06-14 07:51:27 +00:00
parent bbad5525fa
commit a6094f844a
3 changed files with 1 additions and 6 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;