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:
Eitan Adler 2012-01-20 01:39:08 +00:00
parent 335797f33e
commit 3688cbc221
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230359

View file

@ -63,7 +63,6 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
char *p = NULL, *q, *r; char *p = NULL, *q, *r;
struct addrinfo hints, *res = NULL; struct addrinfo hints, *res = NULL;
int max; int max;
char *a;
p = strdup(s); p = strdup(s);
if (!p) if (!p)
@ -88,14 +87,11 @@ prefix_set(const char *s, struct prefix *prefix, int slash)
switch (prefix->a.ss_family) { switch (prefix->a.ss_family) {
case AF_INET: case AF_INET:
max = 32; max = 32;
a = (char *)&((struct sockaddr_in *)&prefix->a)->sin_addr;
break; break;
case AF_INET6: case AF_INET6:
max = 128; max = 128;
a = (char *)&((struct sockaddr_in6 *)&prefix->a)->sin6_addr;
break; break;
default: default:
a = NULL;
max = -1; max = -1;
break; break;
} }