From 65eee719d205c2486c9c2279b146c08253affce7 Mon Sep 17 00:00:00 2001 From: luigi Date: Tue, 9 Jul 2002 06:53:38 +0000 Subject: Change one variable to make it easier to switch between ipfw and ipfw2 --- sys/netinet/ip_dummynet.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys') 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. */ -- cgit v1.1