From owner-svn-src-stable-12@freebsd.org Mon Aug 24 08:13:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1CAB3B4671; Mon, 24 Aug 2020 08:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZlHQ4DQQz4KJq; Mon, 24 Aug 2020 08:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74491157D0; Mon, 24 Aug 2020 08:13:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07O8D6aP064489; Mon, 24 Aug 2020 08:13:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O8D6Fh064488; Mon, 24 Aug 2020 08:13:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240813.07O8D6Fh064488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 08:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364614 - stable/12/lib/libc/net X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/lib/libc/net X-SVN-Commit-Revision: 364614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 08:13:06 -0000 Author: tuexen Date: Mon Aug 24 08:13:06 2020 New Revision: 364614 URL: https://svnweb.freebsd.org/changeset/base/364614 Log: MFC r362332: Whitespace changes, not functional change intended. Modified: stable/12/lib/libc/net/sctp_sys_calls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/net/sctp_sys_calls.c ============================================================================== --- stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:11:47 2020 (r364613) +++ stable/12/lib/libc/net/sctp_sys_calls.c Mon Aug 24 08:13:06 2020 (r364614) @@ -100,7 +100,7 @@ sctp_getaddrlen(sa_family_t family) int sctp_connectx(int sd, const struct sockaddr *addrs, int addrcnt, - sctp_assoc_t * id) + sctp_assoc_t *id) { char *buf; int i, ret, *aa; @@ -159,9 +159,9 @@ sctp_connectx(int sd, const struct sockaddr *addrs, in aa = (int *)buf; *aa = addrcnt; ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X, (void *)buf, - (socklen_t) len); + (socklen_t)len); if ((ret == 0) && (id != NULL)) { - *id = *(sctp_assoc_t *) buf; + *id = *(sctp_assoc_t *)buf; } free(buf); return (ret); @@ -269,7 +269,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } } if (setsockopt(sd, IPPROTO_SCTP, flags, gaddrs, - (socklen_t) argsz) != 0) { + (socklen_t)argsz) != 0) { free(gaddrs); return (-1); } @@ -280,7 +280,7 @@ sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt } int -sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t * size) +sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t *size) { if (arg == NULL) { errno = EINVAL; @@ -409,13 +409,13 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } asoc = id; - opt_len = (socklen_t) sizeof(sctp_assoc_t); + opt_len = (socklen_t)sizeof(sctp_assoc_t); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_REMOTE_ADDR_SIZE, &asoc, &opt_len) != 0) { return (-1); } /* size required is returned in 'asoc' */ - opt_len = (socklen_t) ((size_t)asoc + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)((size_t)asoc + sizeof(sctp_assoc_t)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -465,7 +465,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd return (-1); } size_of_addresses = 0; - opt_len = (socklen_t) sizeof(int); + opt_len = (socklen_t)sizeof(int); if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { errno = ENOMEM; @@ -475,7 +475,7 @@ sctp_getladdrs(int sd, sctp_assoc_t id, struct sockadd errno = ENOTCONN; return (-1); } - opt_len = (socklen_t) (size_of_addresses + sizeof(sctp_assoc_t)); + opt_len = (socklen_t)(size_of_addresses + sizeof(sctp_assoc_t)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { errno = ENOMEM; @@ -586,6 +586,7 @@ sctp_sendmsg(int s, } who = (struct sockaddr *)&addr; } + iov.iov_base = (char *)data; iov.iov_len = len; @@ -632,7 +633,7 @@ sctp_getassocid(int sd, struct sockaddr *sa) if (getsockopt(sd, IPPROTO_SCTP, SCTP_GET_PEER_ADDR_INFO, &sp, &siz) != 0) { /* We depend on the fact that 0 can never be returned */ - return ((sctp_assoc_t) 0); + return ((sctp_assoc_t)0); } return (sp.spinfo_assoc_id); } @@ -748,7 +749,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len, aa++; memcpy((caddr_t)aa, addrs, (size_t)(len - sizeof(int))); ret = setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_DELAYED, (void *)buf, - (socklen_t) len); + (socklen_t)len); free(buf); if (ret != 0) { @@ -766,7 +767,7 @@ continue_send: sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs); if (sinfo->sinfo_assoc_id == 0) { (void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs, - (socklen_t) addrs->sa_len); + (socklen_t)addrs->sa_len); errno = ENOENT; return (-1); } @@ -774,7 +775,7 @@ continue_send: saved_errno = errno; if (no_end_cx == 0) (void)setsockopt(sd, IPPROTO_SCTP, SCTP_CONNECT_X_COMPLETE, (void *)addrs, - (socklen_t) addrs->sa_len); + (socklen_t)addrs->sa_len); errno = saved_errno; return (ret); @@ -808,7 +809,7 @@ sctp_recvmsg(int s, void *dbuf, size_t len, struct sockaddr *from, - socklen_t * fromlen, + socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags) { @@ -878,14 +879,14 @@ sctp_recvmsg(int s, #endif } -ssize_t +ssize_t sctp_recvv(int sd, const struct iovec *iov, int iovlen, struct sockaddr *from, - socklen_t * fromlen, + socklen_t *fromlen, void *info, - socklen_t * infolen, + socklen_t *infolen, unsigned int *infotype, int *flags) { @@ -953,17 +954,17 @@ sctp_recvv(int sd, rn_info = (struct sctp_recvv_rn *)info; rn_info->recvv_rcvinfo = *rcvinfo; rn_info->recvv_nxtinfo = *nxtinfo; - *infolen = (socklen_t) sizeof(struct sctp_recvv_rn); + *infolen = (socklen_t)sizeof(struct sctp_recvv_rn); *infotype = SCTP_RECVV_RN; } else if (*infolen >= sizeof(struct sctp_rcvinfo)) { memcpy(info, rcvinfo, sizeof(struct sctp_rcvinfo)); - *infolen = (socklen_t) sizeof(struct sctp_rcvinfo); + *infolen = (socklen_t)sizeof(struct sctp_rcvinfo); *infotype = SCTP_RECVV_RCVINFO; } } else if (nxtinfo != NULL) { if (*infolen >= sizeof(struct sctp_nxtinfo)) { memcpy(info, nxtinfo, sizeof(struct sctp_nxtinfo)); - *infolen = (socklen_t) sizeof(struct sctp_nxtinfo); + *infolen = (socklen_t)sizeof(struct sctp_nxtinfo); *infotype = SCTP_RECVV_NXTINFO; } } @@ -1105,7 +1106,7 @@ sctp_sendv(int sd, for (i = 0; i < addrcnt; i++) { switch (addr->sa_family) { case AF_INET: - addr_len = (socklen_t) sizeof(struct sockaddr_in); + addr_len = (socklen_t)sizeof(struct sockaddr_in); addr_in = (struct sockaddr_in *)addr; if (addr_in->sin_len != addr_len) { free(cmsgbuf); @@ -1130,7 +1131,7 @@ sctp_sendv(int sd, } break; case AF_INET6: - addr_len = (socklen_t) sizeof(struct sockaddr_in6); + addr_len = (socklen_t)sizeof(struct sockaddr_in6); addr_in6 = (struct sockaddr_in6 *)addr; if (addr_in6->sin6_len != addr_len) { free(cmsgbuf);