diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
commit | 831a80b0d5d50e416fe5e4b237d3a9fd4eea00b8 (patch) | |
tree | f992000fa6fa60b61396de4df4bebeada04cda79 /sys/netatm | |
parent | be317f36a9bf314d51d60720160fc0677390c728 (diff) | |
download | src-831a80b0d5d50e416fe5e4b237d3a9fd4eea00b8.tar.gz src-831a80b0d5d50e416fe5e4b237d3a9fd4eea00b8.zip |
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Notes
Notes:
svn path=/head/; revision=43305
Diffstat (limited to 'sys/netatm')
-rw-r--r-- | sys/netatm/atm_if.c | 13 | ||||
-rw-r--r-- | sys/netatm/atm_subr.c | 6 | ||||
-rw-r--r-- | sys/netatm/atm_usrreq.c | 18 | ||||
-rw-r--r-- | sys/netatm/ipatm/ipatm_load.c | 10 | ||||
-rw-r--r-- | sys/netatm/sigpvc/sigpvc_if.c | 6 | ||||
-rw-r--r-- | sys/netatm/spans/spans_arp.c | 8 | ||||
-rw-r--r-- | sys/netatm/spans/spans_cls.c | 6 | ||||
-rw-r--r-- | sys/netatm/spans/spans_if.c | 12 | ||||
-rw-r--r-- | sys/netatm/spans/spans_msg.c | 6 | ||||
-rw-r--r-- | sys/netatm/spans/spans_print.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/sscf_uni.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/sscop_subr.c | 16 | ||||
-rw-r--r-- | sys/netatm/uni/sscop_timer.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/uniarp.c | 20 | ||||
-rw-r--r-- | sys/netatm/uni/uniarp_input.c | 16 | ||||
-rw-r--r-- | sys/netatm/uni/uniip.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/unisig_if.c | 8 | ||||
-rw-r--r-- | sys/netatm/uni/unisig_mbuf.c | 8 | ||||
-rw-r--r-- | sys/netatm/uni/unisig_msg.h | 6 |
19 files changed, 92 insertions, 91 deletions
diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c index a3609551b484..b4f9ce6e117b 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 328b6be5a57f..261ea109ad2e 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 278d9f8f8574..00a4e38cebe4 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 38254150b1e2..f82d984ca705 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 b3af607af6a1..7cdef3f4e995 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 d2d65e6c3879..b291e55f8301 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 17dc135fc547..24dd44f2b725 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 4557f26a662d..12c9a163bbb7 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 f04cc7fb3bed..486da9ae4745 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 99e8c94b1828..4068be94c233 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 b73452442346..9f6824b81abc 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 16ad1395a243..44d0808aa09b 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 087ae79e96cd..e6b1b906d7f2 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 2d6006f802b3..48140996665f 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 b621ac35c541..80920292226f 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 dd7bc3e3f807..88e79a020487 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 0401154fa803..33bfb488dc83 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 b96a636a4be8..c7f00912c9e3 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 4be014488637..1305bc77e0de 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 |