From nobody Tue Dec 10 18:12:59 2024 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 4Y76KR3scsz5gRYF; Tue, 10 Dec 2024 18:12:59 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y76KR3FxFz458b; Tue, 10 Dec 2024 18:12:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733854379; 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=Ci2YM4qx9anMYExG1SntxrMDGfmP5FhiZvS0d1//ctM=; b=wHIc3AK6uSRemyp+alVFcexy76FAdFtuhPzjqXdc3tQb7HHRw/TZJsq/cMs+X6p+RKr1dL z82YXeipGrq/DeLuh0LJbMfvpiC+mdVcFpV99/4tZGeTgUrQxxlWB+1yTCIFWlFD/cNMvD CNk2Jsf7GMYQZqU+pIq5I63Hteoh5tQgjp7wUCiwvVInO4nH+dU8ZgKfDhURxLSWXPzgp7 vKxnqeJr0n/KvjG0+egyFCxTEHTI3qBIRiwVUdgeaB8vFA7FiD0AaBPC8ou/I+yxOgT0WO +oEBJoajcuA27g8LG9TBVOH+f+OmMUPkKEtCVq7qEtp8HWRVH4FrB+4SmnUjEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733854379; 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=Ci2YM4qx9anMYExG1SntxrMDGfmP5FhiZvS0d1//ctM=; b=K5Ep804qtoFDf5fUytzrWmT0/U6NoYrpxB4UAVcbHscEylVHxds2JM2mEKqN4k9PeTbNhM xLbWtRFWgB2+xhgJc+PPO4LkyEzGfjq+Dyg6T0ID+LmO8DlxxPC50QMqv0p+ls8OY3aLKQ VBAxDCF6vJ5AGezPeLYQ0FCzA0kalkFTSLEqzD69PUZCN578+TmCbaxyRZsiYZhnKS6cM2 W1ZFxPDwvD4gqQdEDOoIvpu2FvcfM7mcyejbFm+gbiQPwQHL75SsgBrbXDaCKZC3lcxeuc g03YVqt3yrm1YfXZovj9qIvmX2qBww8QToAR8TSB7Bg6GjTkQbdZ9X6O07QXXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733854379; a=rsa-sha256; cv=none; b=HOWWzk4/3QXKZY2jxcjkm0nu0/E6iwBPM4j/H+4Llc8p6dRM6JRsFQcpTGIByukLuRNsWJ DWRMv0Xz+8gm4MzrLVzf6RJ7gg5usMzhNrU4mdjmERfcVKzVXjU0uqUh+BlKeBCFNAwyet Q0/Xx8J38ZXaPyxpF7bMB1wVV+pBM7B1YJIbwa2RRjcWc2GJAwXOHTuoVQTf33+snMFgGH 2PxMyF/EjbwZOVVPO6b43dsEarxA4+n0U+5LaVOeUih1dm4C2DN/KfCHpKIgECYEstiH/O J2SHxrOHFUglcpgnMRNPSw3IwPm7ND8VqrFJ6IyFoACszP2HwTw2b8RNGlNPjQ== 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 4Y76KR2sMkzYtG; Tue, 10 Dec 2024 18:12:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BAICxc1022678; Tue, 10 Dec 2024 18:12:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BAICxvY022675; Tue, 10 Dec 2024 18:12:59 GMT (envelope-from git) Date: Tue, 10 Dec 2024 18:12:59 GMT Message-Id: <202412101812.4BAICxvY022675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: c7919fb92d20 - main - netlink: Do not cast to int in NLMSG_HDRLEN and _NLMSG_LEN 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7919fb92d201ab1d5bd3ab0c18cbcea961ef761 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=c7919fb92d201ab1d5bd3ab0c18cbcea961ef761 commit c7919fb92d201ab1d5bd3ab0c18cbcea961ef761 Author: Gleb Popov AuthorDate: 2024-10-29 18:41:34 +0000 Commit: Gleb Popov CommitDate: 2024-12-10 18:11:16 +0000 netlink: Do not cast to int in NLMSG_HDRLEN and _NLMSG_LEN Approved by: melifaro Sponsored by: Future Crew, LLC Differential Revision: https://reviews.freebsd.org/D47333 --- sys/netlink/netlink.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netlink/netlink.h b/sys/netlink/netlink.h index 5724385271fc..e677365b9a21 100644 --- a/sys/netlink/netlink.h +++ b/sys/netlink/netlink.h @@ -210,11 +210,11 @@ enum nlmsginfo_attrs { /* part of netlink(3) API */ #define NLMSG_ALIGNTO NL_ITEM_ALIGN_SIZE #define NLMSG_ALIGN(_len) NL_ITEM_ALIGN(_len) -#define NLMSG_HDRLEN ((int)sizeof(struct nlmsghdr)) +#define NLMSG_HDRLEN (sizeof(struct nlmsghdr)) #define NLMSG_LENGTH(_len) ((_len) + NLMSG_HDRLEN) #define NLMSG_SPACE(_len) NLMSG_ALIGN(NLMSG_LENGTH(_len)) #define NLMSG_DATA(_hdr) NL_ITEM_DATA(_hdr, NLMSG_HDRLEN) -#define _NLMSG_LEN(_hdr) ((int)(_hdr)->nlmsg_len) +#define _NLMSG_LEN(_hdr) ((_hdr)->nlmsg_len) #define _NLMSG_ALIGNED_LEN(_hdr) NLMSG_ALIGN(_NLMSG_LEN(_hdr)) #define NLMSG_OK(_hdr, _len) NL_ITEM_OK(_hdr, _len, NLMSG_HDRLEN, _NLMSG_LEN) #define NLMSG_PAYLOAD(_hdr,_len) (_NLMSG_LEN(_hdr) - NLMSG_SPACE((_len))) @@ -223,7 +223,7 @@ enum nlmsginfo_attrs { #else #define NLMSG_ALIGNTO 4U #define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1)) -#define NLMSG_HDRLEN ((int)NLMSG_ALIGN(sizeof(struct nlmsghdr))) +#define NLMSG_HDRLEN (NLMSG_ALIGN(sizeof(struct nlmsghdr))) #endif /*