diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
commit | dbf5cd2b57217eb6c73488177fc6a096ead934b6 (patch) | |
tree | 1de192fde2322188e529943e6982359b783fd78e /sys/net | |
parent | 5a53b379176ab48879944fa794655a1cbc840630 (diff) | |
download | FreeBSD-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/net')
-rw-r--r-- | sys/net/bpf.c | 4 | ||||
-rw-r--r-- | sys/net/if_fddisubr.c | 6 | ||||
-rw-r--r-- | sys/net/if_sl.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 | ||||
-rw-r--r-- | sys/net/route.c | 4 | ||||
-rw-r--r-- | sys/net/rtsock.c | 6 | ||||
-rw-r--r-- | sys/net/zlib.c | 6 | ||||
-rw-r--r-- | sys/net/zlib.h | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 001d797..a49ac6d 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.45 1998/11/11 10:04:09 truckman Exp $ + * $Id: bpf.c,v 1.46 1998/12/07 21:58:36 archie Exp $ */ #include "bpfilter.h" @@ -985,7 +985,7 @@ bpf_ifname(ifp, ifr) char *s = ifp->if_name; char *d = ifr->ifr_name; - while (*d++ = *s++) + while ((*d++ = *s++) != 0) continue; d--; /* back to the null */ /* XXX Assume that unit number is less than 10. */ diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 67b7af1..11d3a5a 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp - * $Id: if_fddisubr.c,v 1.32 1998/06/14 20:58:14 julian Exp $ + * $Id: if_fddisubr.c,v 1.33 1998/06/21 14:53:23 bde Exp $ */ #include "opt_atalk.h" @@ -149,9 +149,9 @@ fddi_output(ifp, m0, dst, rt0) senderr(ENETDOWN); getmicrotime(&ifp->if_lastchange); #if !defined(__bsdi__) || _BSDI_VERSION >= 199401 - if (rt = rt0) { + if ((rt = rt0) != NULL) { if ((rt->rt_flags & RTF_UP) == 0) { - if (rt0 = rt = RTALLOC1(dst, 1)) + if ((rt0 = rt = RTALLOC1(dst, 1)) != NULL) rt->rt_refcnt--; else senderr(EHOSTUNREACH); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 151df6e..e1c6296 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.70 1998/07/15 02:32:23 bde Exp $ + * $Id: if_sl.c,v 1.71 1999/01/21 08:29:07 dillon Exp $ */ /* @@ -603,7 +603,7 @@ slstart(tp) bcopy(mtod(m1, caddr_t), cp, mlen); cp += mlen; len += mlen; - } while (m1 = m1->m_next); + } while ((m1 = m1->m_next) != NULL); } #endif ip = mtod(m, struct ip *); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index ed98e6c..c395ee3 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -480,8 +480,8 @@ tunread(dev, uio, flag) return EWOULDBLOCK; } tp->tun_flags |= TUN_RWAIT; - if( error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1), - "tunread", 0)) { + if((error = tsleep((caddr_t)tp, PCATCH | (PZERO + 1), + "tunread", 0)) != 0) { splx(s); return error; } diff --git a/sys/net/route.c b/sys/net/route.c index f011264..6a17db6 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)route.c 8.2 (Berkeley) 11/15/93 - * $Id: route.c,v 1.49 1998/02/09 06:09:59 eivind Exp $ + * $Id: route.c,v 1.50 1998/04/17 22:36:57 des Exp $ */ #include "opt_inet.h" @@ -566,7 +566,7 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt) * Add the gateway. Possibly re-malloc-ing the storage for it * also add the rt_gwroute if possible. */ - if (error = rt_setgate(rt, dst, gateway)) { + if ((error = rt_setgate(rt, dst, gateway)) != 0) { Free(rt); senderr(error); } diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 97707e3..bf5da6e 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.5 (Berkeley) 11/2/94 - * $Id: rtsock.c,v 1.36 1997/10/28 15:58:37 bde Exp $ + * $Id: rtsock.c,v 1.37 1997/10/31 08:53:13 davidg Exp $ */ @@ -356,8 +356,8 @@ route_output(m, so) case RTM_LOCK: if ((rnh = rt_tables[dst->sa_family]) == 0) { senderr(EAFNOSUPPORT); - } else if (rt = (struct rtentry *) - rnh->rnh_lookup(dst, netmask, rnh)) + } else if ((rt = (struct rtentry *) + rnh->rnh_lookup(dst, netmask, rnh)) != NULL) rt->rt_refcnt++; else senderr(ESRCH); diff --git a/sys/net/zlib.c b/sys/net/zlib.c index f16092d..687e380 100644 --- a/sys/net/zlib.c +++ b/sys/net/zlib.c @@ -10,7 +10,7 @@ * - added inflateIncomp and deflateOutputPending * - allow strm->next_out to be NULL, meaning discard the output * - * $Id: zlib.c,v 1.6 1998/03/21 20:56:15 peter Exp $ + * $Id: zlib.c,v 1.7 1998/06/20 16:28:04 peter Exp $ */ /* @@ -99,7 +99,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) + return (strm->msg = (const char*)ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ @@ -807,7 +807,7 @@ int deflateInit2_(strm, level, method, windowBits, memLevel, strategy, if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + strm->msg = (const char*)ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } diff --git a/sys/net/zlib.h b/sys/net/zlib.h index 13fe524..b9499cb 100644 --- a/sys/net/zlib.h +++ b/sys/net/zlib.h @@ -1,4 +1,4 @@ -/* $Id: zlib.h,v 1.3 1997/08/19 14:10:50 peter Exp $ */ +/* $Id: zlib.h,v 1.4 1998/03/21 20:56:16 peter Exp $ */ /* * This file is derived from zlib.h and zconf.h from the zlib-1.0.4 @@ -281,7 +281,7 @@ typedef struct z_stream_s { uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total nb of bytes output so far */ - char *msg; /* last error message, NULL if no error */ + const char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ |