From: Guy Harris Date: Wed, 21 Mar 2018 04:12:48 +0000 (-0700) Subject: Get rid of the qualval type. X-Git-Tag: libpcap-1.9-bp~198 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/58fb63ab6ade3d307d56852debb46804641bbcb6 Get rid of the qualval type. It didn't work. --- diff --git a/gencode.h b/gencode.h index 41dcdf60..58828ecd 100644 --- a/gencode.h +++ b/gencode.h @@ -55,9 +55,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* Type of a qualifier. */ -typedef unsigned char qualval; - /* Address qualifiers. */ #define Q_HOST 1 @@ -281,9 +278,9 @@ struct arth { }; struct qual { - qualval addr; - qualval proto; - qualval dir; + unsigned char addr; + unsigned char proto; + unsigned char dir; unsigned char pad; }; diff --git a/grammar.y b/grammar.y index ed7a90c1..28bc0376 100644 --- a/grammar.y +++ b/grammar.y @@ -90,9 +90,9 @@ DIAG_ON_BISON_BYACC #include "os-proto.h" #endif -#define QSET(q, p, d, a) (q).proto = (p),\ - (q).dir = (d),\ - (q).addr = (a) +#define QSET(q, p, d, a) (q).proto = (unsigned char)(p),\ + (q).dir = (unsigned char)(d),\ + (q).addr = (unsigned char)(a) struct tok { int v; /* value */ @@ -272,7 +272,6 @@ DIAG_OFF_BISON_BYACC %union { int i; - qualval q; bpf_u_int32 h; u_char *e; char *s; @@ -289,7 +288,7 @@ DIAG_OFF_BISON_BYACC %type expr id nid pid term rterm qid %type head -%type pqual dqual aqual ndaqual +%type pqual dqual aqual ndaqual %type arth narth %type byteop pname pnum relop irelop %type and or paren not null prog