Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2021 16:05:25 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 5ac4ac85ca20 - main - Remove an always-true check.
Message-ID:  <202109151605.18FG5PIS086347@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=5ac4ac85ca20ce1f00c84502a65a3291bf416c18

commit 5ac4ac85ca20ce1f00c84502a65a3291bf416c18
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-09-15 16:03:17 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-09-15 16:03:17 +0000

    Remove an always-true check.
    
    This fixes a -Wtype-limits error from GCC 9.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D31936
---
 lib/libvmmapi/vmmapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 0543c92f4300..a2d26b1b33b9 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -486,7 +486,7 @@ vm_rev_map_gpa(struct vmctx *ctx, void *addr)
 	offaddr = (char *)addr - ctx->baseaddr;
 
 	if (ctx->lowmem > 0)
-		if (offaddr >= 0 && offaddr <= ctx->lowmem)
+		if (offaddr <= ctx->lowmem)
 			return (offaddr);
 
 	if (ctx->highmem > 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109151605.18FG5PIS086347>