From nobody Fri Apr 21 08:02:14 2023 X-Original-To: dev-commits-src-all@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 4Q2n7B5CH7z464VN; Fri, 21 Apr 2023 08:02:14 +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 4Q2n7B4lDXz47Xg; Fri, 21 Apr 2023 08:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064134; 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=9TU1MEA2uUKEo5KnABF+5Hwhp/VqaweYoIcRSiVBjUw=; b=P/uBtYQC7GHo1ePsp6Y4KR5FgI/ClBY+WxvaV1IQM2o7mn+0ijZynUYr1wWm0w8dQ2ymdY FAn5zLUP4/zOX2j5JAjWRtek4IM9GqdDj6HLVI239YAHGnLNz7D+pkZTUDaArIWngQdTOi aPKSaBk5jj1Jv78Pz/Ft0WR0gpMXEdS+vQBCJKyE4d5NOcfW41xWbZvDJCh8mi6eShEzwA wdQ1AtUux+UvlUfan9VCn4mpJVHRY2r7LdEEoPZWWFTCNcL6I0hB12cXCloxTx0E/u1cFh foM5FgcE6sTQ2kpLcw0Vseddot/pbijiodUuEG8gMA/+Q96OHag+VHmoYYVnWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064134; 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=9TU1MEA2uUKEo5KnABF+5Hwhp/VqaweYoIcRSiVBjUw=; b=DLTUI8TIkvrWMc0YqItSMhRLcJ1xpWMBwzEjuskpDWjrzs8sIqrnsnDHTZbueNUW1X+3Tr 9Y2PgeECLPzGGvtDHSFCSRJsg71mLUc1W2Vv1VUHxHvZpCxXauL9dPXDKoAPjDRtoZ+F/n Pe2Rj4rMmIGxoircmppADlWjg0mZMqhWe3JoXrQ0I775rVo9vIe4bDIL3PKgLo/efUuV7f X50Cb3lFh3yhSxL8vYeKZ/WNiQMSJecV11eAcaBDwhdTy/E3cjmjSgd9EDAt8BFLZ2+Ztu RHDN3rsXpUk7iQ/4er6q9jHL4IFX4zIV6XmDQWcgT0Q8y0rE+Wj3CGsr4Ie4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682064134; a=rsa-sha256; cv=none; b=nDcYGHFyg+PS+5/w+kFhEXEKohp54vn2UD1UO30Bz+LKaW8v2G5g0/DmbkHkX1zom64x6V OjvUWbco+J3y+rcrAmoGSAkhT0I2rnv9LnX/h/yEvjEvL9EHrRa/N8xxuvaUu6raKazz1w uI+YUcbzpS1zu/nJLNEund54cjS5M++aZbKRQjB8xJXVKzNyUGHjuTs5SjiMkpJpeYOmXV FcfxpVlXhExlCeKP0q/EY2PtvuaS7HbvSfNXLeGy7j/LoQX6TnwlsSOdvMi5o642cFtNb4 nfp2ZBtg/hvhMIdaTp74CjMiWeJV/kqj1fBWZb5DnQhDGaKHHcWLslkz0fIaGg== 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 4Q2n7B3p9zz1C49; Fri, 21 Apr 2023 08:02:14 +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 33L82EhJ009875; Fri, 21 Apr 2023 08:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L82E5v009874; Fri, 21 Apr 2023 08:02:14 GMT (envelope-from git) Date: Fri, 21 Apr 2023 08:02:14 GMT Message-Id: <202304210802.33L82E5v009874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 444c6615459e - main - mpr: don't use hardcoded value in debug branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 444c6615459efe2b015deb1cffc54fcaa3ea1fca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=444c6615459efe2b015deb1cffc54fcaa3ea1fca commit 444c6615459efe2b015deb1cffc54fcaa3ea1fca Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:57:38 +0000 Commit: Mariusz Zaborski CommitDate: 2023-04-21 08:01:38 +0000 mpr: don't use hardcoded value in debug branch Pointed out by: imp Sponsored by: Klara Inc. --- sys/dev/mpr/mpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index b9996806f213..dc95c8a6a803 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2759,9 +2759,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); @@ -2815,9 +2815,9 @@ mpr_reregister_events(struct mpr_softc *sc) evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask));