Set the correct member of a YYSTYPE for an IPv6 address - it's returned
as a string, rather than as a binary address. This removes a warning from the Sun C compiler, although it probably doesn't change the generated code (the "e" and "s" members of the union probably have the same data representation and reside in the same part of the union; if they didn't, the old code wouldn't have worked).
This commit is contained in:
parent
1d0879987d
commit
5b8139d3d4
|
@ -22,7 +22,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.86 2002-07-11 09:06:46 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.87 2002-07-27 18:41:23 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -283,7 +283,7 @@ ${B} { yylval.e = pcap_ether_aton(((char *)yytext)+1);
|
|||
if (getaddrinfo(yytext, NULL, &hints, &res))
|
||||
bpf_error("bogus IPv6 address %s", yytext);
|
||||
else {
|
||||
yylval.e = sdup((char *)yytext); return HID6;
|
||||
yylval.s = sdup((char *)yytext); return HID6;
|
||||
}
|
||||
#else
|
||||
bpf_error("IPv6 address %s not supported", yytext);
|
||||
|
|
Reference in New Issue