ospfd: fix unused warning in ospf_write

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2015-09-15 02:11:45 -07:00 committed by Donald Sharp
parent 7a2fbbf0ee
commit 233cc0fb5a

View file

@ -645,8 +645,8 @@ ospf_write (struct thread *thread)
struct listnode *node; struct listnode *node;
#ifdef WANT_OSPF_WRITE_FRAGMENT #ifdef WANT_OSPF_WRITE_FRAGMENT
static u_int16_t ipid = 0; static u_int16_t ipid = 0;
#endif /* WANT_OSPF_WRITE_FRAGMENT */
u_int16_t maxdatasize; u_int16_t maxdatasize;
#endif /* WANT_OSPF_WRITE_FRAGMENT */
#define OSPF_WRITE_IPHL_SHIFT 2 #define OSPF_WRITE_IPHL_SHIFT 2
int pkt_count = 0; int pkt_count = 0;
@ -675,9 +675,10 @@ ospf_write (struct thread *thread)
* and reliability - not more data, than our * and reliability - not more data, than our
* socket can accept * socket can accept
*/ */
#ifdef WANT_OSPF_WRITE_FRAGMENT
maxdatasize = MIN (oi->ifp->mtu, ospf->maxsndbuflen) - maxdatasize = MIN (oi->ifp->mtu, ospf->maxsndbuflen) -
sizeof (struct ip); sizeof (struct ip);
#endif /* WANT_OSPF_WRITE_FRAGMENT */
/* Get one packet from queue. */ /* Get one packet from queue. */
op = ospf_fifo_head (oi->obuf); op = ospf_fifo_head (oi->obuf);
assert (op); assert (op);