summaryrefslogtreecommitdiffstats
path: root/sys/netatm/uni
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/netatm/uni
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/netatm/uni')
-rw-r--r--sys/netatm/uni/sscf_uni.c6
-rw-r--r--sys/netatm/uni/sscop_subr.c16
-rw-r--r--sys/netatm/uni/sscop_timer.c6
-rw-r--r--sys/netatm/uni/uniarp.c20
-rw-r--r--sys/netatm/uni/uniarp_input.c16
-rw-r--r--sys/netatm/uni/uniip.c6
-rw-r--r--sys/netatm/uni/unisig_if.c8
-rw-r--r--sys/netatm/uni/unisig_mbuf.c8
-rw-r--r--sys/netatm/uni/unisig_msg.h6
9 files changed, 46 insertions, 46 deletions
diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c
index b734524..9f6824b 100644
--- a/sys/netatm/uni/sscf_uni.c
+++ b/sys/netatm/uni/sscf_uni.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: sscf_uni.c,v 1.4 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -43,7 +43,7 @@
#include <netatm/uni/sscf_uni_var.h>
#ifndef lint
-__RCSID("@(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $");
+__RCSID("@(#) $Id: sscf_uni.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
#endif
@@ -107,7 +107,7 @@ sscf_uni_start()
/*
* Register stack service
*/
- if (err = atm_stack_register(&sscf_uni_service))
+ if ((err = atm_stack_register(&sscf_uni_service)) != 0)
goto done;
done:
diff --git a/sys/netatm/uni/sscop_subr.c b/sys/netatm/uni/sscop_subr.c
index 16ad139..44d0808 100644
--- a/sys/netatm/uni/sscop_subr.c
+++ b/sys/netatm/uni/sscop_subr.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_subr.c,v 1.3 1998/10/31 20:07:00 phk Exp $
*
*/
@@ -44,7 +44,7 @@
#include <netatm/uni/sscop_var.h>
#ifndef lint
-__RCSID("@(#) $Id: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
+__RCSID("@(#) $Id: sscop_subr.c,v 1.3 1998/10/31 20:07:00 phk Exp $");
#endif
@@ -297,7 +297,7 @@ sscop_rexmit_insert(sop, php)
* Otherwise, loop thru the queue until we find the
* proper insertion point for the PDU
*/
- while (next = curr->ph_rexmit_lk) {
+ while ((next = curr->ph_rexmit_lk) != NULL) {
if (SEQ_LT(seq, next->ph_ns, sop->so_ack)) {
php->ph_rexmit_lk = next;
curr->ph_rexmit_lk = php;
@@ -396,7 +396,7 @@ sscop_xmit_drain(sop)
/*
* Free transmission queue buffers
*/
- while (m = sop->so_xmit_hd) {
+ while ((m = sop->so_xmit_hd) != NULL) {
sop->so_xmit_hd = KB_QNEXT(m);
KB_FREEALL(m);
}
@@ -415,7 +415,7 @@ sscop_xmit_drain(sop)
/*
* Free pending ack queue buffers
*/
- while (php = sop->so_pack_hd) {
+ while ((php = sop->so_pack_hd) != NULL) {
sop->so_pack_hd = php->ph_pack_lk;
KB_FREEALL(php->ph_buf);
}
@@ -475,7 +475,7 @@ sscop_recv_insert(sop, php)
* to make sure there isn't a PDU already on the queue
* with a matching sequence number.
*/
- while (next = curr->ph_recv_lk) {
+ while ((next = curr->ph_recv_lk) != NULL) {
if (SEQ_LT(seq, next->ph_ns, sop->so_rcvnext)) {
if (seq == curr->ph_ns)
return (1);
@@ -518,7 +518,7 @@ sscop_rcvr_drain(sop)
/*
* Free receive queue buffers
*/
- while (php = sop->so_recv_hd) {
+ while ((php = sop->so_recv_hd) != NULL) {
sop->so_recv_hd = php->ph_recv_lk;
KB_FREEALL(php->ph_buf);
}
@@ -557,7 +557,7 @@ sscop_service_xmit(sop)
* (Congestion control will be added later)
*/
while (1) {
- if (php = sop->so_rexmit_hd) {
+ if ((php = sop->so_rexmit_hd) != NULL) {
/*
* Send SD PDU from retransmit queue
diff --git a/sys/netatm/uni/sscop_timer.c b/sys/netatm/uni/sscop_timer.c
index 087ae79..e6b1b90 100644
--- a/sys/netatm/uni/sscop_timer.c
+++ b/sys/netatm/uni/sscop_timer.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_timer.c,v 1.3 1998/10/31 20:07:00 phk Exp $
*
*/
@@ -44,7 +44,7 @@
#include <netatm/uni/sscop_var.h>
#ifndef lint
-__RCSID("@(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
+__RCSID("@(#) $Id: sscop_timer.c,v 1.3 1998/10/31 20:07:00 phk Exp $");
#endif
@@ -101,7 +101,7 @@ sscop_timeout(tip)
* If an expired timer is found, notify that entry.
*/
sprev = &sscop_head;
- while (sop = *sprev) {
+ while ((sop = *sprev) != NULL) {
/*
* Check out each timer
diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c
index 2d6006f..4814099 100644
--- a/sys/netatm/uni/uniarp.c
+++ b/sys/netatm/uni/uniarp.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: uniarp.c,v 1.5 1999/01/19 23:16:11 mks Exp $
*
*/
@@ -43,7 +43,7 @@
#include <netatm/uni/uniip_var.h>
#ifndef lint
-__RCSID("@(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
+__RCSID("@(#) $Id: uniarp.c,v 1.5 1999/01/19 23:16:11 mks Exp $");
#endif
@@ -425,7 +425,7 @@ uniarp_server_mode(uip)
* We're becoming the server, so kill the pending connection
*/
UNIIP_ARP_CANCEL(uip);
- if (ivp = uip->uip_arpsvrvcc) {
+ if ((ivp = uip->uip_arpsvrvcc) != NULL) {
ivp->iv_flags &= ~IVF_NOIDLE;
uip->uip_arpsvrvcc = NULL;
(*ivp->iv_ipnif->inf_arpnotify)(ivp, MAP_FAILED);
@@ -556,7 +556,7 @@ uniarp_client_mode(uip, aap)
* We're changing servers, so kill the pending connection
*/
UNIIP_ARP_CANCEL(uip);
- if (ivp = uip->uip_arpsvrvcc) {
+ if ((ivp = uip->uip_arpsvrvcc) != NULL) {
ivp->iv_flags &= ~IVF_NOIDLE;
uip->uip_arpsvrvcc = NULL;
(*ivp->iv_ipnif->inf_arpnotify)(ivp, MAP_FAILED);
@@ -1040,8 +1040,8 @@ uniarp_ioctl(code, data, arg1)
/*
* Copy the response into the user's buffer
*/
- if (err = copyout((caddr_t)&aar, buf_addr,
- sizeof(aar)))
+ if ((err = copyout((caddr_t)&aar, buf_addr,
+ sizeof(aar))) != 0)
break;
buf_addr += sizeof(aar);
buf_len -= sizeof(aar);
@@ -1090,8 +1090,8 @@ uniarp_ioctl(code, data, arg1)
/*
* Copy the response into the user's buffer
*/
- if (err = copyout((caddr_t)&aar, buf_addr,
- sizeof(aar)))
+ if ((err = copyout((caddr_t)&aar, buf_addr,
+ sizeof(aar))) != 0)
break;
buf_addr += sizeof(aar);
buf_len -= sizeof(aar);
@@ -1176,7 +1176,7 @@ updbuf:
/*
* Copy the response into the user's buffer
*/
- if (err = copyout((caddr_t)&asr, buf_addr, sizeof(asr)))
+ if ((err = copyout((caddr_t)&asr, buf_addr, sizeof(asr))) != 0)
break;
buf_addr += sizeof(asr);
buf_len -= sizeof(asr);
@@ -1191,7 +1191,7 @@ updbuf:
err = ENOSPC;
break;
}
- if (err = copyout(uip->uip_prefix, buf_addr, i))
+ if ((err = copyout(uip->uip_prefix, buf_addr, i)) != 0)
break;
buf_addr += i;
buf_len -= i;
diff --git a/sys/netatm/uni/uniarp_input.c b/sys/netatm/uni/uniarp_input.c
index b621ac3..8092029 100644
--- a/sys/netatm/uni/uniarp_input.c
+++ b/sys/netatm/uni/uniarp_input.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: uniarp_input.c,v 1.3 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -43,7 +43,7 @@
#include <netatm/uni/uniip_var.h>
#ifndef lint
-__RCSID("@(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $");
+__RCSID("@(#) $Id: uniarp_input.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
#endif
@@ -122,7 +122,7 @@ uniarp_cpcs_data(tok, m)
/*
* Verify/gather source address fields
*/
- if (len = (ahp->ah_shtl & ARP_TL_LMASK)) {
+ if ((len = (ahp->ah_shtl & ARP_TL_LMASK)) != 0) {
if (ahp->ah_shtl & ARP_TL_E164) {
if (len > sizeof(struct atm_addr_e164))
goto bad;
@@ -141,7 +141,7 @@ uniarp_cpcs_data(tok, m)
satm.address_length = 0;
}
- if (len = (ahp->ah_sstl & ARP_TL_LMASK)) {
+ if ((len = (ahp->ah_sstl & ARP_TL_LMASK)) != 0) {
if (((ahp->ah_sstl & ARP_TL_TMASK) != ARP_TL_NSAPA) ||
(len != sizeof(struct atm_addr_nsap)))
goto bad;
@@ -155,7 +155,7 @@ uniarp_cpcs_data(tok, m)
satmsub.address_length = 0;
}
- if (len = ahp->ah_spln) {
+ if ((len = ahp->ah_spln) != 0) {
if (len != sizeof(struct in_addr))
goto bad;
if (KB_COPYDATA(m, plen, len, (caddr_t)&sip))
@@ -168,7 +168,7 @@ uniarp_cpcs_data(tok, m)
/*
* Verify/gather target address fields
*/
- if (len = (ahp->ah_thtl & ARP_TL_LMASK)) {
+ if ((len = (ahp->ah_thtl & ARP_TL_LMASK)) != 0) {
if (ahp->ah_thtl & ARP_TL_E164) {
if (len > sizeof(struct atm_addr_e164))
goto bad;
@@ -187,7 +187,7 @@ uniarp_cpcs_data(tok, m)
tatm.address_length = 0;
}
- if (len = (ahp->ah_tstl & ARP_TL_LMASK)) {
+ if ((len = (ahp->ah_tstl & ARP_TL_LMASK)) != 0) {
if (((ahp->ah_tstl & ARP_TL_TMASK) != ARP_TL_NSAPA) ||
(len != sizeof(struct atm_addr_nsap)))
goto bad;
@@ -201,7 +201,7 @@ uniarp_cpcs_data(tok, m)
tatmsub.address_length = 0;
}
- if (len = ahp->ah_tpln) {
+ if ((len = ahp->ah_tpln) != 0) {
if (len != sizeof(struct in_addr))
goto bad;
if (KB_COPYDATA(m, plen, len, (caddr_t)&tip))
diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c
index dd7bc3e..88e79a0 100644
--- a/sys/netatm/uni/uniip.c
+++ b/sys/netatm/uni/uniip.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $
+ * @(#) $Id: uniip.c,v 1.2 1998/10/31 20:07:00 phk Exp $
*
*/
@@ -42,7 +42,7 @@
#include <netatm/uni/uniip_var.h>
#ifndef lint
-__RCSID("@(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $");
+__RCSID("@(#) $Id: uniip.c,v 1.2 1998/10/31 20:07:00 phk Exp $");
#endif
@@ -68,7 +68,7 @@ struct ip_serv uniip_ipserv = {
uniarp_svcactive,
uniarp_vcclose,
NULL,
- {ATM_AAL5, ATM_ENC_LLC},
+ { { ATM_AAL5, ATM_ENC_LLC} },
};
diff --git a/sys/netatm/uni/unisig_if.c b/sys/netatm/uni/unisig_if.c
index 0401154..33bfb48 100644
--- a/sys/netatm/uni/unisig_if.c
+++ b/sys/netatm/uni/unisig_if.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: unisig_if.c,v 1.5 1998/12/11 21:47:46 phk Exp $
*
*/
@@ -47,7 +47,7 @@
#include <netatm/uni/unisig_msg.h>
#ifndef lint
-__RCSID("@(#) $Id: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
+__RCSID("@(#) $Id: unisig_if.c,v 1.5 1998/12/11 21:47:46 phk Exp $");
#endif
@@ -936,8 +936,8 @@ unisig_ioctl(code, data, arg1)
/*
* Copy the response into the user's buffer
*/
- if (err = copyout((caddr_t)&rsp, buf_addr,
- sizeof(rsp)))
+ if ((err = copyout((caddr_t)&rsp, buf_addr,
+ sizeof(rsp))) != 0)
break;
buf_addr += sizeof(rsp);
buf_len -= sizeof(rsp);
diff --git a/sys/netatm/uni/unisig_mbuf.c b/sys/netatm/uni/unisig_mbuf.c
index b96a636..c7f0091 100644
--- a/sys/netatm/uni/unisig_mbuf.c
+++ b/sys/netatm/uni/unisig_mbuf.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: unisig_mbuf.c,v 1.3 1998/10/31 20:07:01 phk Exp $
*
*/
@@ -42,7 +42,7 @@
#include <netatm/uni/unisig_msg.h>
#ifndef lint
-__RCSID("@(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
+__RCSID("@(#) $Id: unisig_mbuf.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
#endif
@@ -229,9 +229,9 @@ usf_short(usf, s)
if (usf->usf_op == USF_ENCODE)
tval.value = htons(*s);
- if (rc = usf_byte(usf, &tval.b[0]))
+ if ((rc = usf_byte(usf, &tval.b[0])) != 0)
return(rc);
- if (rc = usf_byte(usf, &tval.b[1]))
+ if ((rc = usf_byte(usf, &tval.b[1])) != 0)
return(rc);
if (usf->usf_op == USF_DECODE)
diff --git a/sys/netatm/uni/unisig_msg.h b/sys/netatm/uni/unisig_msg.h
index 4be0144..1305bc7 100644
--- a/sys/netatm/uni/unisig_msg.h
+++ b/sys/netatm/uni/unisig_msg.h
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_msg.h,v 1.8 1998/08/26 23:29:23 mks Exp $
+ * @(#) $Id: unisig_msg.h,v 1.1 1998/09/15 08:23:11 phk Exp $
*
*/
@@ -114,8 +114,8 @@ struct unisig_msg {
#define EXTRACT_CREF(x) \
((x) & UNI_MSG_CALL_REF_RMT ? (x) & UNI_MSG_CALL_REF_MASK : (x) | UNI_MSG_CALL_REF_RMT)
-#define GLOBAL_CREF(x) ((x) & UNI_MSG_CALL_REF_MASK == UNI_MSG_CALL_REF_GLOBAL)
-#define DUMMY_CREF(x) ((x) & UNI_MSG_CALL_REF_MASK == UNI_MSG_CALL_REF_DUMMY)
+#define GLOBAL_CREF(x) (((x) & UNI_MSG_CALL_REF_MASK) == UNI_MSG_CALL_REF_GLOBAL)
+#define DUMMY_CREF(x) (((x) & UNI_MSG_CALL_REF_MASK) == UNI_MSG_CALL_REF_DUMMY)
#define UNI_MSG_TYPE_FLAG_MASK 1
#define UNI_MSG_TYPE_FLAG_SHIFT 4
OpenPOWER on IntegriCloud