summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-07-09 06:53:38 +0000
committerluigi <luigi@FreeBSD.org>2002-07-09 06:53:38 +0000
commit65eee719d205c2486c9c2279b146c08253affce7 (patch)
tree90754064015cb0d6798bf5b1a8aa4b56a1462cc7 /sys
parent78ca5fd896732f41465222268eee12f763f02d74 (diff)
downloadFreeBSD-src-65eee719d205c2486c9c2279b146c08253affce7.zip
FreeBSD-src-65eee719d205c2486c9c2279b146c08253affce7.tar.gz
Change one variable to make it easier to switch between ipfw and ipfw2
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_dummynet.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 5943317..9ec7e0a 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -1060,10 +1060,8 @@ dummynet_io(struct mbuf *m, int pipe_nr, int dir, struct ip_fw_args *fwa)
struct dn_pipe *pipe ;
u_int64_t len = m->m_pkthdr.len ;
struct dn_flow_queue *q = NULL ;
- int s ;
- int action = fwa->rule->cmd[fwa->rule->act_ofs].opcode;
-
- s = splimp();
+ int s = splimp();
+ int is_pipe = (fwa->rule->cmd[fwa->rule->act_ofs].opcode == O_PIPE);
pipe_nr &= 0xffff ;
@@ -1150,7 +1148,7 @@ dummynet_io(struct mbuf *m, int pipe_nr, int dir, struct ip_fw_args *fwa)
* to schedule it. This involves different actions for fixed-rate or
* WF2Q queues.
*/
- if ( action == O_PIPE ) {
+ if (is_pipe) {
/*
* Fixed-rate queue: just insert into the ready_heap.
*/
OpenPOWER on IntegriCloud