mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 00:20:29 +00:00
Fix warning when compiling with gcc46:
error: variable 'a' set but not used Approved by: dim, cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days
This commit is contained in:
parent
335797f33e
commit
3688cbc221
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230359
|
@ -63,7 +63,6 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
|
|||
char *p = NULL, *q, *r;
|
||||
struct addrinfo hints, *res = NULL;
|
||||
int max;
|
||||
char *a;
|
||||
|
||||
p = strdup(s);
|
||||
if (!p)
|
||||
|
@ -88,14 +87,11 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
|
|||
switch (prefix->a.ss_family) {
|
||||
case AF_INET:
|
||||
max = 32;
|
||||
a = (char *)&((struct sockaddr_in *)&prefix->a)->sin_addr;
|
||||
break;
|
||||
case AF_INET6:
|
||||
max = 128;
|
||||
a = (char *)&((struct sockaddr_in6 *)&prefix->a)->sin6_addr;
|
||||
break;
|
||||
default:
|
||||
a = NULL;
|
||||
max = -1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue