summaryrefslogtreecommitdiffstats
path: root/sys/netatm
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
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')
-rw-r--r--sys/netatm/atm_if.c13
-rw-r--r--sys/netatm/atm_subr.c6
-rw-r--r--sys/netatm/atm_usrreq.c18
-rw-r--r--sys/netatm/ipatm/ipatm_load.c10
-rw-r--r--sys/netatm/sigpvc/sigpvc_if.c6
-rw-r--r--sys/netatm/spans/spans_arp.c8
-rw-r--r--sys/netatm/spans/spans_cls.c6
-rw-r--r--sys/netatm/spans/spans_if.c12
-rw-r--r--sys/netatm/spans/spans_msg.c6
-rw-r--r--sys/netatm/spans/spans_print.c6
-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
19 files changed, 92 insertions, 91 deletions
diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c
index a360955..b4f9ce6 100644
--- a/sys/netatm/atm_if.c
+++ b/sys/netatm/atm_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: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_if.c,v 1.3 1998/12/04 22:54:52 archie Exp $
*
*/
@@ -38,7 +38,7 @@
#include <netatm/kern_include.h>
#ifndef lint
-__RCSID("@(#) $Id: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
+__RCSID("@(#) $Id: atm_if.c,v 1.3 1998/12/04 22:54:52 archie Exp $");
#endif
@@ -428,14 +428,14 @@ atm_physif_ioctl(code, data, arg)
/*
* Copy interface name into response
*/
- if ( err = copyout ( ifname, apsp->app_intf, IFNAMSIZ ) )
+ if ((err = copyout ( ifname, apsp->app_intf, IFNAMSIZ)) != 0)
break;
/*
* Copy counters
*/
- if ( err = copyout ( &pip->pif_ipdus, &apsp->app_ipdus,
- len - sizeof ( apsp->app_intf ) ) )
+ if ((err = copyout(&pip->pif_ipdus, &apsp->app_ipdus,
+ len - sizeof(apsp->app_intf))) != 0)
break;
/*
@@ -524,8 +524,7 @@ atm_physif_ioctl(code, data, arg)
}
#endif
- if ( err = atm_nif_attach ( nip ) )
- {
+ if ((err = atm_nif_attach(nip)) != 0) {
atm_free ( (caddr_t)nip );
/*
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c
index 328b6be..261ea10 100644
--- a/sys/netatm/atm_subr.c
+++ b/sys/netatm/atm_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: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $
+ * @(#) $Id: atm_subr.c,v 1.3 1998/10/31 20:06:54 phk Exp $
*
*/
@@ -38,7 +38,7 @@
#include <netatm/kern_include.h>
#ifndef lint
-__RCSID("@(#) $Id: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $");
+__RCSID("@(#) $Id: atm_subr.c,v 1.3 1998/10/31 20:06:54 phk Exp $");
#endif
@@ -54,7 +54,7 @@ struct ifqueue atm_intrq;
#ifdef sgi
int atm_intr_index;
#endif
-struct atm_sock_stat atm_sock_stat = {0};
+struct atm_sock_stat atm_sock_stat = { { 0 } };
int atm_init = 0;
int atm_debug = 0;
int atm_dev_print = 0;
diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c
index 278d9f8..00a4e38 100644
--- a/sys/netatm/atm_usrreq.c
+++ b/sys/netatm/atm_usrreq.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $
*
*/
@@ -38,7 +38,7 @@
#include <netatm/kern_include.h>
#ifndef lint
-__RCSID("@(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
+__RCSID("@(#) $Id: atm_usrreq.c,v 1.3 1999/01/19 23:16:10 mks Exp $");
#endif
@@ -515,7 +515,7 @@ atm_dgram_info(data)
* Get ARP table information
*/
for (pip = atm_interface_head; pip; pip = pip->pif_next) {
- if (smp = pip->pif_sigmgr) {
+ if ((smp = pip->pif_sigmgr) != NULL) {
err = (*smp->sm_ioctl)(AIOCS_INF_ARP,
data, (caddr_t)pip->pif_siginst);
}
@@ -533,7 +533,7 @@ atm_dgram_info(data)
* Interface specified
*/
if ((nip = atm_nifname(aip->air_asrv_intf))) {
- if (smp = nip->nif_pif->pif_sigmgr) {
+ if ((smp = nip->nif_pif->pif_sigmgr) != NULL) {
err = (*smp->sm_ioctl)(AIOCS_INF_ASV,
data, (caddr_t)nip);
}
@@ -546,7 +546,7 @@ atm_dgram_info(data)
*/
for (pip = atm_interface_head; pip;
pip = pip->pif_next) {
- if (smp = pip->pif_sigmgr) {
+ if ((smp = pip->pif_sigmgr) != NULL) {
for (nip = pip->pif_nif; nip;
nip = nip->nif_pnext) {
err = (*smp->sm_ioctl)
@@ -599,7 +599,7 @@ atm_dgram_info(data)
* Interface specified
*/
if ((pip = atm_pifname(aip->air_vcc_intf))) {
- if (smp = pip->pif_sigmgr) {
+ if ((smp = pip->pif_sigmgr) != NULL) {
err = (*smp->sm_ioctl)(AIOCS_INF_VCC,
data,
(caddr_t)pip->pif_siginst);
@@ -613,7 +613,7 @@ atm_dgram_info(data)
*/
for (pip = atm_interface_head; pip;
pip = pip->pif_next) {
- if (smp = pip->pif_sigmgr) {
+ if ((smp = pip->pif_sigmgr) != NULL) {
err = (*smp->sm_ioctl)(AIOCS_INF_VCC,
data,
(caddr_t)pip->pif_siginst);
@@ -694,9 +694,9 @@ atm_dgram_info(data)
err = ENOSPC;
break;
}
- if (err = copyout((caddr_t)&atm_version,
+ if ((err = copyout((caddr_t)&atm_version,
aip->air_buf_addr,
- sizeof(atm_version))) {
+ sizeof(atm_version))) != 0) {
break;
}
aip->air_buf_addr += sizeof(atm_version);
diff --git a/sys/netatm/ipatm/ipatm_load.c b/sys/netatm/ipatm/ipatm_load.c
index 3825415..f82d984 100644
--- a/sys/netatm/ipatm/ipatm_load.c
+++ b/sys/netatm/ipatm/ipatm_load.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $
+ * @(#) $Id: ipatm_load.c,v 1.2 1998/10/31 20:06:55 phk Exp $
*
*/
@@ -46,7 +46,7 @@
#include <netatm/ipatm/ipatm_serv.h>
#ifndef lint
-__RCSID("@(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $");
+__RCSID("@(#) $Id: ipatm_load.c,v 1.2 1998/10/31 20:06:55 phk Exp $");
#endif
@@ -501,9 +501,9 @@ ipatm_start()
/*
* Now start listening
*/
- if (err = atm_cm_listen(&ipatm_endpt, (void *)i,
+ if ((err = atm_cm_listen(&ipatm_endpt, (void *)i,
&ipatm_listeners[i].attr,
- &ipatm_listeners[i].conn))
+ &ipatm_listeners[i].conn)) != 0)
goto done;
}
@@ -569,7 +569,7 @@ ipatm_stop()
/*
* Detach all our interfaces
*/
- while (inp = ipatm_nif_head) {
+ while ((inp = ipatm_nif_head) != NULL) {
(void) ipatm_nifstat(NCM_DETACH, inp->inf_nif, 0);
}
diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c
index b3af607..7cdef3f 100644
--- a/sys/netatm/sigpvc/sigpvc_if.c
+++ b/sys/netatm/sigpvc/sigpvc_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: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: sigpvc_if.c,v 1.4 1999/01/19 23:11:39 mks Exp $
*
*/
@@ -46,7 +46,7 @@
#include <netatm/sigpvc/sigpvc_var.h>
#ifndef lint
-__RCSID("@(#) $Id: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
+__RCSID("@(#) $Id: sigpvc_if.c,v 1.4 1999/01/19 23:11:39 mks Exp $");
#endif
@@ -639,7 +639,7 @@ sigpvc_ioctl(code, data, arg1)
/*
* Copy data to user buffer and update buffer info
*/
- if (err = copyout((caddr_t)&avr, cp, sizeof(avr)))
+ if ((err = copyout((caddr_t)&avr, cp, sizeof(avr))) != 0)
break;
cp += sizeof(avr);
space -= sizeof(avr);
diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c
index d2d65e6..b291e55 100644
--- a/sys/netatm/spans/spans_arp.c
+++ b/sys/netatm/spans/spans_arp.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: spans_arp.c,v 1.4 1999/01/19 23:11:40 mks Exp $
*
*/
@@ -44,7 +44,7 @@
#include <netatm/spans/spans_cls.h>
#ifndef lint
-__RCSID("@(#) $Id: spans_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
+__RCSID("@(#) $Id: spans_arp.c,v 1.4 1999/01/19 23:11:40 mks Exp $");
#endif
@@ -1108,8 +1108,8 @@ spansarp_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);
diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c
index 17dc135..24dd44f 100644
--- a/sys/netatm/spans/spans_cls.c
+++ b/sys/netatm/spans/spans_cls.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_cls.c,v 1.3 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -44,7 +44,7 @@
#include <netatm/spans/spans_cls.h>
#ifndef lint
-__RCSID("@(#) $Id: spans_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $");
+__RCSID("@(#) $Id: spans_cls.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
#endif
@@ -703,7 +703,7 @@ spanscls_cpcs_data(tok, m)
/*
* Packet is ready for input to IP
*/
- if (inp = clp->cls_ipnif)
+ if ((inp = clp->cls_ipnif) != NULL)
(void) (*inp->inf_ipinput)(inp, m);
else
KB_FREEALL(m);
diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c
index 4557f26..12c9a16 100644
--- a/sys/netatm/spans/spans_if.c
+++ b/sys/netatm/spans/spans_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: spans_if.c,v 1.3 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -46,7 +46,7 @@
#include <netatm/spans/spans_var.h>
#ifndef lint
-__RCSID("@(#) $Id: spans_if.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
+__RCSID("@(#) $Id: spans_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
#endif
/*
@@ -428,7 +428,7 @@ spans_detach(pip)
/*
* Now close the SPANS signalling VCC
*/
- if (cop = spp->sp_conn) {
+ if ((cop = spp->sp_conn) != NULL) {
err = atm_cm_release(cop, &spans_cause);
if (err)
ATM_DEBUG2(
@@ -727,7 +727,7 @@ spans_reject(vcp, errp)
* Clean up the VCCB--the connection manager will free it
* spans_close_vcc will send a SPANS open response
*/
- if (*errp = spans_close_vcc(spp, svp, TRUE)) {
+ if ((*errp = spans_close_vcc(spp, svp, TRUE)) != 0) {
ATM_DEBUG0("spans_reject: spans_close_vcc failed\n");
return(CALL_FAILED);
}
@@ -1018,8 +1018,8 @@ spans_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/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c
index f04cc7f..486da9a 100644
--- a/sys/netatm/spans/spans_msg.c
+++ b/sys/netatm/spans/spans_msg.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_msg.c,v 1.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: spans_msg.c,v 1.3 1998/10/31 20:06:56 phk Exp $
*
*/
@@ -42,7 +42,7 @@
#include <netatm/spans/spans_var.h>
#ifndef lint
-__RCSID("@(#) $Id: spans_msg.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
+__RCSID("@(#) $Id: spans_msg.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
#endif
/*
@@ -545,7 +545,7 @@ spans_open_req(spp, msg)
/*
* See if the connection is new
*/
- if (svp = spans_find_conn(spp, &msg->sm_open_req.opreq_conn)) {
+ if ((svp = spans_find_conn(spp, &msg->sm_open_req.opreq_conn)) != NULL) {
/*
* We already have a VCCB that matches the connection in
* the request
diff --git a/sys/netatm/spans/spans_print.c b/sys/netatm/spans/spans_print.c
index 99e8c94..4068be9 100644
--- a/sys/netatm/spans/spans_print.c
+++ b/sys/netatm/spans/spans_print.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_print.c,v 1.4 1998/12/04 22:54:53 archie Exp $
*
*/
@@ -41,7 +41,7 @@
#include <netatm/spans/spans_var.h>
#ifndef lint
-__RCSID("@(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
+__RCSID("@(#) $Id: spans_print.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
#endif
/*
@@ -1067,6 +1067,8 @@ spans_print_msgbody(objp)
rccnf_p->rccnf_conn.con_dsap,
rccnf_p->rccnf_conn.con_ssap);
break;
+ default:
+ break;
}
printf("\n");
}
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