slirp: Compiler suggested cleanups

This commit is contained in:
Mark Pizzolato 2015-10-17 08:02:02 -07:00
parent 42405a4463
commit 442e70328e
2 changed files with 7 additions and 7 deletions

View file

@ -1030,7 +1030,7 @@ trimthenstep6:
incr = incr * incr / cw; incr = incr * incr / cw;
tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale); tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale);
} }
if (acked > so->so_snd.sb_cc) { if (acked > (int)so->so_snd.sb_cc) {
tp->snd_wnd -= so->so_snd.sb_cc; tp->snd_wnd -= so->so_snd.sb_cc;
sbdrop(&so->so_snd, (int )so->so_snd.sb_cc); sbdrop(&so->so_snd, (int )so->so_snd.sb_cc);
ourfinisacked = 1; ourfinisacked = 1;

View file

@ -115,7 +115,7 @@ again:
* to send then the probe will be the FIN * to send then the probe will be the FIN
* itself. * itself.
*/ */
if (off < so->so_snd.sb_cc) if (off < (int)so->so_snd.sb_cc)
flags &= ~TH_FIN; flags &= ~TH_FIN;
win = 1; win = 1;
} else { } else {
@ -124,7 +124,7 @@ again:
} }
} }
len = min(so->so_snd.sb_cc, win) - off; len = min((long)so->so_snd.sb_cc, win) - off;
if (len < 0) { if (len < 0) {
/* /*
@ -166,12 +166,12 @@ again:
if (len) { if (len) {
if (len == tp->t_maxseg) if (len == tp->t_maxseg)
goto send; goto send;
if ((1 || idle || tp->t_flags & TF_NODELAY) && if ((1 || idle || (tp->t_flags & TF_NODELAY)) &&
len + off >= so->so_snd.sb_cc) ((len + off) >= (long)so->so_snd.sb_cc))
goto send; goto send;
if (tp->t_force) if (tp->t_force)
goto send; goto send;
if (len >= tp->max_sndwnd / 2 && tp->max_sndwnd > 0) if ((len >= (long)(tp->max_sndwnd / 2)) && (tp->max_sndwnd > 0))
goto send; goto send;
if (SEQ_LT(tp->snd_nxt, tp->snd_max)) if (SEQ_LT(tp->snd_nxt, tp->snd_max))
goto send; goto send;
@ -280,7 +280,7 @@ send:
* Adjust data length if insertion of options will * Adjust data length if insertion of options will
* bump the packet length beyond the t_maxseg length. * bump the packet length beyond the t_maxseg length.
*/ */
if (len > tp->t_maxseg - optlen) { if (len > (long)(tp->t_maxseg - optlen)) {
len = tp->t_maxseg - optlen; len = tp->t_maxseg - optlen;
sendalot = 1; sendalot = 1;
} }