summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-01-27 22:42:27 +0000
committerdillon <dillon@FreeBSD.org>1999-01-27 22:42:27 +0000
commitdbf5cd2b57217eb6c73488177fc6a096ead934b6 (patch)
tree1de192fde2322188e529943e6982359b783fd78e /sys/netinet
parent5a53b379176ab48879944fa794655a1cbc840630 (diff)
downloadFreeBSD-src-dbf5cd2b57217eb6c73488177fc6a096ead934b6.zip
FreeBSD-src-dbf5cd2b57217eb6c73488177fc6a096ead934b6.tar.gz
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c4
-rw-r--r--sys/netinet/ip_dummynet.c4
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/ip_proxy.c10
-rw-r--r--sys/netinet/ip_state.c10
-rw-r--r--sys/netinet/tcp_input.c4
-rw-r--r--sys/netinet/tcp_reass.c4
7 files changed, 20 insertions, 20 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index d604ad0..cdd5a60 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
- * $Id: in_pcb.c,v 1.45 1998/09/17 18:42:16 fenner Exp $
+ * $Id: in_pcb.c,v 1.46 1998/12/07 21:58:37 archie Exp $
*/
#include <sys/param.h>
@@ -439,7 +439,7 @@ in_pcbconnect(inp, nam, p)
/*
* Call inner routine, to assign local interface address.
*/
- if (error = in_pcbladdr(inp, nam, &ifaddr))
+ if ((error = in_pcbladdr(inp, nam, &ifaddr)) != 0)
return(error);
if (in_pcblookup_hash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index e495b60..76f4e28 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -10,7 +10,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_dummynet.c,v 1.6 1999/01/12 16:40:57 eivind Exp $
+ * $Id: ip_dummynet.c,v 1.7 1999/01/12 16:43:52 eivind Exp $
*/
/*
@@ -137,7 +137,7 @@ dn_move(struct dn_pipe *pipe, int immediate)
/* this ought to go in dn_dequeue() */
if (!immediate && pipe->ticks_from_last_insert < pipe->delay)
pipe->ticks_from_last_insert++;
- if ( pkt = pipe->r.head ) {
+ if ((pkt = pipe->r.head) != NULL) {
/*
* Move at most numbytes bytes from src and move to dst.
* delay is set to ticks_from_last_insert, which
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 0d775ea..b75a51c 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.111 1999/01/12 12:25:00 eivind Exp $
+ * $Id: ip_input.c,v 1.112 1999/01/22 16:50:45 wollman Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@@ -129,7 +129,7 @@ SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RD,
#define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2)
#define IPREASS_HMASK (IPREASS_NHASH - 1)
#define IPREASS_HASH(x,y) \
- ((((x) & 0xF | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK)
+ (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK)
static struct ipq ipq[IPREASS_NHASH];
static int nipq = 0; /* total # of reass queues */
diff --git a/sys/netinet/ip_proxy.c b/sys/netinet/ip_proxy.c
index fe18abb..3176429 100644
--- a/sys/netinet/ip_proxy.c
+++ b/sys/netinet/ip_proxy.c
@@ -6,7 +6,7 @@
* to the original author and the contributors.
*/
#if !defined(lint)
-static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 1.2 1998/03/21 11:34:23 peter Exp $";
+static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 1.3 1998/06/20 18:37:50 peter Exp $";
#endif
#if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL)
@@ -127,13 +127,13 @@ u_short sport, dport;
{
if (aps->aps_dst.s_addr == dst.s_addr) {
if ((aps->aps_src.s_addr == src.s_addr) &&
- (!tcp || (sport == aps->aps_sport) &&
- (dport == aps->aps_dport)))
+ (!tcp || ((sport == aps->aps_sport) &&
+ (dport == aps->aps_dport))))
return 1;
} else if (aps->aps_dst.s_addr == src.s_addr) {
if ((aps->aps_src.s_addr == dst.s_addr) &&
- (!tcp || (sport == aps->aps_dport) &&
- (dport == aps->aps_sport)))
+ (!tcp || ((sport == aps->aps_dport) &&
+ (dport == aps->aps_sport))))
return 1;
}
return 0;
diff --git a/sys/netinet/ip_state.c b/sys/netinet/ip_state.c
index 5545b3d..b6a8054 100644
--- a/sys/netinet/ip_state.c
+++ b/sys/netinet/ip_state.c
@@ -7,7 +7,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.3 1998/06/20 18:37:51 peter Exp $";
+static const char rcsid[] = "@(#)$Id: ip_state.c,v 1.4 1998/11/26 18:54:52 eivind Exp $";
#endif
#include "opt_ipfilter.h"
@@ -478,8 +478,8 @@ u_short sp, dp;
(!out && is->is_ifpin == ifp)) &&
(is->is_dst.s_addr == dst.s_addr) &&
(is->is_src.s_addr == src.s_addr) &&
- (!tcp || (sp == is->is_sport) &&
- (dp == is->is_dport))) {
+ (!tcp || ((sp == is->is_sport) &&
+ (dp == is->is_dport)))) {
ret = 1;
}
} else {
@@ -487,8 +487,8 @@ u_short sp, dp;
(!out && is->is_ifpout == ifp)) &&
(is->is_dst.s_addr == src.s_addr) &&
(is->is_src.s_addr == dst.s_addr) &&
- (!tcp || (sp == is->is_dport) &&
- (dp == is->is_sport))) {
+ (!tcp || ((sp == is->is_dport) &&
+ (dp == is->is_sport)))) {
ret = 1;
}
}
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 97d1983..41454a4 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.81 1998/09/11 16:04:03 wollman Exp $
+ * $Id: tcp_input.c,v 1.82 1998/12/03 20:23:20 dillon Exp $
*/
#include "opt_ipfw.h" /* for ipfw_fwd */
@@ -530,7 +530,7 @@ findpcb:
* if the segment has a CC option equal to CCrecv
*/
((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
- (to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv) &&
+ ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) &&
ti->ti_seq == tp->rcv_nxt &&
tiwin && tiwin == tp->snd_wnd &&
tp->snd_nxt == tp->snd_max) {
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 97d1983..41454a4 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.81 1998/09/11 16:04:03 wollman Exp $
+ * $Id: tcp_input.c,v 1.82 1998/12/03 20:23:20 dillon Exp $
*/
#include "opt_ipfw.h" /* for ipfw_fwd */
@@ -530,7 +530,7 @@ findpcb:
* if the segment has a CC option equal to CCrecv
*/
((tp->t_flags & (TF_REQ_CC|TF_RCVD_CC)) != (TF_REQ_CC|TF_RCVD_CC) ||
- (to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv) &&
+ ((to.to_flag & TOF_CC) != 0 && to.to_cc == tp->cc_recv)) &&
ti->ti_seq == tp->rcv_nxt &&
tiwin && tiwin == tp->snd_wnd &&
tp->snd_nxt == tp->snd_max) {
OpenPOWER on IntegriCloud