From 471eefa0baf1bbf9488c6c8b5587c06d3c8ac195 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 2 Jul 2024 19:59:54 +0000 Subject: [PATCH] Fix unintended comparison between signed and unsigned integer. C type conversion rules are hard, let's go shopping. ok patrick@ --- sys/arch/arm64/arm64/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 925ccfb4486..ae17940fbc8 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.122 2024/07/02 10:25:16 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.123 2024/07/02 19:59:54 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -2005,7 +2005,7 @@ cpu_psci_init(struct cpu_info *ci) */ len = OF_getproplen(node, "domain-idle-states"); - if (len < sizeof(uint32_t)) + if (len < (int)sizeof(uint32_t)) return; states = malloc(len, M_TEMP, M_WAITOK); -- 2.20.1