From nobody Mon May 01 14:47:17 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95dy1bw0z48cyL; Mon, 1 May 2023 14:47:18 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q95dx6X7Nz3jyM; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=Wn51MT+JUl+LVzj/YCbOvXe+tMVGPSKZ9xNYAfUcJLWMSbc6NmvURjqx0CZ8fLlP1y/3fS tBrOAY5LeulqqdLKwJgYyvq+Vc5642JALTMoX0pTL2/33zobjujvnccM+N/jpEpQViURp5 Di2knVn3KZPdWL4NHz8YM8cc/5LIZY4NVcRGu5a1xdndcBzxwhzMR+LdS94MGYK1ShyoVe 1Zvt83mEFDbZWVA3Oc4lQmzIMRYW8p0gzWca7CYAKIFoj4QSk7EAPDNKFQ+Ixj83oe6Z4y Ob7wkaTO5E/GXgfE21qjl1t9AqX3kt2fxG+uz6qhlU8ikh+925dxLxoHq6LZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=mQz7H1flKZewYG2Dh4WzN+osoy4wDReDSI80ZarYuUuqQD5oYmq4wqrte+s+3LMbZRDvoh s8bM8SV6J3q9owDCybCeZsWEIZ2mZjOXf46otumOlM979Q/NSY3i6bkTna+TlwGXok9f/K NYMiGasWG+I240hG1cWkNuNqJSnrRXdYYayrQwoGP5EqOa8Tu7ykcvJ9Eaz3mOZtrxhJAT r8UR5o+i4dLOacKMMJdMtgm085VTG9J9HjZ5XdcAG1PGCJ2CwoCZ4RhhESW1AYdj+bUVLf +e1oc7DYF1NX1bYh+UlYNsau0adyVSsTysJ7T9rd++gQbpH77dmUHVRE7syzzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682952437; a=rsa-sha256; cv=none; b=VxRFaRuYUMGSM3ka5nw87QaiubpvVrOFy6IFGc65e23YUJRMx/vHBn81gazhYwi5t4oV0c qO3qeg/gM4C5yx5Zb3V4cVVy+4JNDS2d75t7DDsAKr/xvQXQjeYgku0ngUHlqV4ueKoOxa 8Wu/X5b9zFx0ScJXHzMzAbtiZsfSJRV+Z94oQMzGvAm3aP2Sjb5z6YmunZr4ufzqHN0+Qs sRUULCvBoc1lSGN7lVX5Ms8JqtJJvlJM3ehO6/HGiiYqo7e7sMpbaVGZpOc3eBWRoVxoY4 Fd7ClGN3QiBWlf4XsOWU7L6Bas7XMgSHxHNZ4zA7rlC2Qo9y7tEXS0Y6ytY3Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95dx5Tzxz182P; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341ElHqg023341; Mon, 1 May 2023 14:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341ElHPM023339; Mon, 1 May 2023 14:47:17 GMT (envelope-from git) Date: Mon, 1 May 2023 14:47:17 GMT Message-Id: <202305011447.341ElHPM023339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 88406e631e93 - main - netlink: whitespace fix in netlink_message_writer.h. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88406e631e93e08deee9fde97b12e3e1bf6b0590 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=88406e631e93e08deee9fde97b12e3e1bf6b0590 commit 88406e631e93e08deee9fde97b12e3e1bf6b0590 Author: Alexander V. Chernikov AuthorDate: 2023-05-01 14:45:45 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-05-01 14:47:11 +0000 netlink: whitespace fix in netlink_message_writer.h. Reported by: garga MFC after: 2 weeks --- sys/netlink/netlink_message_writer.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 92e43834efc7..d64400f3677e 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -186,7 +186,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) hdr->nlmsg_flags, payload_len)); } -#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) +#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) /* * KPI similar to mtodo(): @@ -196,7 +196,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) static inline int nlattr_save_offset(const struct nl_writer *nw) { - return (nw->offset - ((char *)nw->hdr - nw->data)); + return (nw->offset - ((char *)nw->hdr - nw->data)); } static inline void * @@ -218,16 +218,16 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) { sz = NETLINK_ALIGN(sz); - if (__predict_false(nw->offset + sz > nw->alloc_len)) { + if (__predict_false(nw->offset + sz > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, sz)) return (NULL); - } + } - void *data_ptr = &nw->data[nw->offset]; - nw->offset += sz; + void *data_ptr = &nw->data[nw->offset]; + nw->offset += sz; bzero(data_ptr, sz); - return (data_ptr); + return (data_ptr); } #define nlmsg_reserve_object(_ns, _t) ((_t *)nlmsg_reserve_data_raw(_ns, sizeof(_t))) #define nlmsg_reserve_data(_ns, _sz, _t) ((_t *)nlmsg_reserve_data_raw(_ns, _sz)) @@ -263,24 +263,24 @@ nlattr_add(struct nl_writer *nw, int attr_type, int attr_len, const void *data) { int required_len = NLA_ALIGN(attr_len + sizeof(struct nlattr)); - if (__predict_false(nw->offset + required_len > nw->alloc_len)) { + if (__predict_false(nw->offset + required_len > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, required_len)) return (false); } - struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); + struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); - nla->nla_len = attr_len + sizeof(struct nlattr); - nla->nla_type = attr_type; - if (attr_len > 0) { + nla->nla_len = attr_len + sizeof(struct nlattr); + nla->nla_type = attr_type; + if (attr_len > 0) { if ((attr_len % 4) != 0) { /* clear padding bytes */ bzero((char *)nla + required_len - 4, 4); } - memcpy((nla + 1), data, attr_len); + memcpy((nla + 1), data, attr_len); } - nw->offset += required_len; - return (true); + nw->offset += required_len; + return (true); } static inline bool