git: 8f553746b412 - main - acpidump: correct memcmp() result check

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 22 Oct 2024 19:35:23 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=8f553746b4120a6a9d2ffa12d6755c13705a03fa

commit 8f553746b4120a6a9d2ffa12d6755c13705a03fa
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-10-22 19:29:52 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-10-22 19:34:33 +0000

    acpidump: correct memcmp() result check
    
    Fixes:  e9ab827df94fed8f129ca4f7756e23ce77d8a655
    Sponsored by:   The FreeBSD Foundation
---
 usr.sbin/acpi/acpidump/acpi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index 18a0ae486387..7ebd3e764005 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -2574,7 +2574,8 @@ static void
 acpi_report_sdp(ACPI_TABLE_HEADER *sdp)
 {
 	for (u_int i = 0; i < nitems(known); i++) {
-		if (memcmp(sdp->Signature, known[i].sig, ACPI_NAMESEG_SIZE) != 0) {
+		if (memcmp(sdp->Signature, known[i].sig, ACPI_NAMESEG_SIZE)
+		    == 0) {
 			known[i].fnp(sdp);
 			return;
 		}