diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-15 02:49:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-15 02:49:15 +0000 |
commit | c594e2f38499bc46716cad5ce0ff48ddc0e258b2 (patch) | |
tree | be014a1f6cf6d26720a4aaeae47c4c545fd4a5ef | |
parent | 6727cb0f7c731fa3702606ad41ac483e940e9af8 (diff) |
Swap the code for a calling function and what it calls, so that the called
function is in scope and a pointer is not returned via an int
ok dtucker
-rw-r--r-- | lib/libpcap/gencode.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c index e416606e3f4..fb540a95f23 100644 --- a/lib/libpcap/gencode.c +++ b/lib/libpcap/gencode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gencode.c,v 1.30 2008/06/11 15:02:21 dtucker Exp $ */ +/* $OpenBSD: gencode.c,v 1.31 2008/06/15 02:49:14 deraadt Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998 @@ -3142,19 +3142,6 @@ gen_p80211_type(int type, int mask) return (b0); } -struct block * -gen_acode(eaddr, q) - register const u_char *eaddr; - struct qual q; -{ - if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) { - if (linktype == DLT_ARCNET) - return gen_ahostop(eaddr, (int)q.dir); - } - bpf_error("ARCnet address used in non-arc expression"); - /* NOTREACHED */ -} - static struct block * gen_ahostop(eaddr, dir) register const u_char *eaddr; @@ -3187,6 +3174,19 @@ gen_ahostop(eaddr, dir) /* NOTREACHED */ } +struct block * +gen_acode(eaddr, q) + register const u_char *eaddr; + struct qual q; +{ + if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) { + if (linktype == DLT_ARCNET) + return gen_ahostop(eaddr, (int)q.dir); + } + bpf_error("ARCnet address used in non-arc expression"); + /* NOTREACHED */ +} + /* * support IEEE 802.1Q VLAN trunk over ethernet */ |