Compact code a bit

Approved by:	glebius (mentor)
This commit is contained in:
Alexander Motin 2007-05-04 16:12:54 +00:00
parent 755bc28723
commit adecf751c3

View File

@ -477,7 +477,9 @@ ng_mppc_compress(node_p node, struct mbuf *m, struct mbuf **resultp)
/* Initialize */
*resultp = NULL;
header = d->cc;
if (d->flushed) {
/* Always set the flushed bit in stateless mode */
if (d->flushed || ((d->cfg.bits & MPPE_STATELESS) != 0)) {
header |= MPPC_FLAG_FLUSHED;
d->flushed = 0;
}
@ -539,10 +541,6 @@ ng_mppc_compress(node_p node, struct mbuf *m, struct mbuf **resultp)
}
FREE(inbuf, M_NETGRAPH_MPPC);
/* Always set the flushed bit in stateless mode */
if ((d->cfg.bits & MPPE_STATELESS) != 0)
header |= MPPC_FLAG_FLUSHED;
/* Now encrypt packet (if encryption enabled) */
#ifdef NETGRAPH_MPPC_ENCRYPTION
if ((d->cfg.bits & MPPE_BITS) != 0) {