Skip to content

Commit

Permalink
Whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed Oct 7, 2020
1 parent eb43760 commit 53579be
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 27 deletions.
16 changes: 8 additions & 8 deletions usrsctplib/netinet/sctp_cc_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#if defined(__FreeBSD__) && !defined(__Userspace__)
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp_cc_functions.c 366114 2020-09-24 12:26:06Z tuexen $");
__FBSDID("$FreeBSD: head/sys/netinet/sctp_cc_functions.c 366517 2020-10-07 15:22:48Z tuexen $");
#endif

#include <netinet/sctp_os.h>
Expand Down Expand Up @@ -2070,19 +2070,19 @@ htcp_alpha_update(struct htcp *ca)

if (diff > (uint32_t)hz) {
diff -= hz;
factor = 1+ ( 10*diff + ((diff/2)*(diff/2)/hz))/hz;
factor = 1+ (10 * diff + ((diff / 2) * (diff / 2) / hz)) / hz;
}

if (use_rtt_scaling && minRTT) {
uint32_t scale = (hz<<3)/(10*minRTT);
scale = min(max(scale, 1U<<2), 10U<<3); /* clamping ratio to interval [0.5,10]<<3 */
factor = (factor<<3)/scale;
if (!factor)
uint32_t scale = (hz << 3) / (10 * minRTT);
scale = min(max(scale, 1U << 2), 10U << 3); /* clamping ratio to interval [0.5,10]<<3 */
factor = (factor << 3) / scale;
if (factor != 0)
factor = 1;
}

ca->alpha = 2*factor*((1<<7)-ca->beta);
if (!ca->alpha)
ca->alpha = 2 * factor * ((1 << 7) - ca->beta);
if (ca->alpha != 0)
ca->alpha = ALPHA_BASE;
}

Expand Down
6 changes: 3 additions & 3 deletions usrsctplib/netinet/sctp_indata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* We just put the last bit on */
if (control->on_strm_q) {
#ifdef INVARIANTS
if (control->on_strm_q != SCTP_ON_UNORDERED ) {
if (control->on_strm_q != SCTP_ON_UNORDERED) {
panic("Huh control: %p on_q: %d -- not unordered?",
control, control->on_strm_q);
}
Expand Down Expand Up @@ -1185,7 +1185,7 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (control->end_added) {
if (control->on_strm_q) {
#ifdef INVARIANTS
if (control->on_strm_q != SCTP_ON_ORDERED ) {
if (control->on_strm_q != SCTP_ON_ORDERED) {
panic("Huh control: %p on_q: %d -- not ordered?",
control, control->on_strm_q);
}
Expand Down Expand Up @@ -1238,7 +1238,7 @@ sctp_deliver_reasm_check(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* We are done with it afterwards */
if (control->on_strm_q) {
#ifdef INVARIANTS
if (control->on_strm_q != SCTP_ON_ORDERED ) {
if (control->on_strm_q != SCTP_ON_ORDERED) {
panic("Huh control: %p on_q: %d -- not ordered?",
control, control->on_strm_q);
}
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/netinet/sctp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -3906,7 +3906,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb,
if (action == SCTP_STREAM_RESET_RESULT_PERFORMED) {
/* Put the new streams into effect */
int i;
for ( i = asoc->streamoutcnt; i< (asoc->streamoutcnt + num_stream); i++) {
for (i = asoc->streamoutcnt; i < (asoc->streamoutcnt + num_stream); i++) {
asoc->strmout[i].state = SCTP_STREAM_OPEN;
}
asoc->streamoutcnt += num_stream;
Expand Down
19 changes: 9 additions & 10 deletions usrsctplib/netinet/sctp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#if defined(__FreeBSD__) && !defined(__Userspace__)
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 366482 2020-10-06 11:08:52Z tuexen $");
__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 366517 2020-10-07 15:22:48Z tuexen $");
#endif

#include <netinet/sctp_os.h>
Expand Down Expand Up @@ -2659,7 +2659,7 @@ sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,

ifn = SCTP_GET_IFN_VOID_FROM_ROUTE(ro);
ifn_index = SCTP_GET_IF_INDEX_FROM_ROUTE(ro);
sctp_ifn = sctp_find_ifn( ifn, ifn_index);
sctp_ifn = sctp_find_ifn(ifn, ifn_index);

/*
* first question, is the ifn we will emit on in our list? If so,
Expand Down Expand Up @@ -2830,14 +2830,13 @@ sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn,
#else
struct sctp_inpcb *inp SCTP_UNUSED,
#endif
struct sctp_tcb *stcb,
int non_asoc_addr_ok,
uint8_t dest_is_loop,
uint8_t dest_is_priv,
int addr_wanted,
sa_family_t fam,
sctp_route_t *ro
)
struct sctp_tcb *stcb,
int non_asoc_addr_ok,
uint8_t dest_is_loop,
uint8_t dest_is_priv,
int addr_wanted,
sa_family_t fam,
sctp_route_t *ro)
{
struct sctp_ifa *ifa, *sifa;
int num_eligible_addr = 0;
Expand Down
4 changes: 2 additions & 2 deletions usrsctplib/netinet/sctp_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7770,7 +7770,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
for (strmat = 0; strmat < asoc->streamincnt; strmat++) {
TAILQ_FOREACH_SAFE(control, &asoc->strmin[strmat].inqueue, next_instrm, ncontrol) {
#ifdef INVARIANTS
if (control->on_strm_q != SCTP_ON_ORDERED ) {
if (control->on_strm_q != SCTP_ON_ORDERED) {
panic("Huh control: %p on_q: %d -- not ordered?",
control, control->on_strm_q);
}
Expand Down Expand Up @@ -7830,7 +7830,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
}
TAILQ_FOREACH_SAFE(control, &asoc->strmin[strmat].uno_inqueue, next_instrm, ncontrol) {
#ifdef INVARIANTS
if (control->on_strm_q != SCTP_ON_UNORDERED ) {
if (control->on_strm_q != SCTP_ON_UNORDERED) {
panic("Huh control: %p on_q: %d -- not unordered?",
control, control->on_strm_q);
}
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/netinet/sctp_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -5644,7 +5644,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
break;
}
/* Do any streams have data queued? */
for ( i = 0; i< stcb->asoc.streamoutcnt; i++) {
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
if (!TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) {
goto busy_out;
}
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/netinet/sctputil.c
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ sctp_timeout_handler(void *t)
if (inp != NULL)
sctp_auditing(5, inp, stcb, net);
#endif
if (did_output && (stcb != NULL) ) {
if (did_output && (stcb != NULL)) {
/*
* Now we need to clean up the control chunk chain if an
* ECNE is on it. It must be marked as UNSENT again so next
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/netinet6/sctp6_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ sctp6_usrreq(so, req, m, nam, control, p)
switch (family) {
case PF_INET:
error = in_control(so, (long)m, (caddr_t)nam,
(struct ifnet *)control );
(struct ifnet *)control);
break;
#ifdef INET6
case PF_INET6:
Expand Down

0 comments on commit 53579be

Please sign in to comment.