git: 5ac4ac85ca20 - main - Remove an always-true check.

John Baldwin jhb at FreeBSD.org
Wed Sep 15 16:05:25 UTC 2021


The branch main has been updated by jhb:

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

commit 5ac4ac85ca20ce1f00c84502a65a3291bf416c18
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-09-15 16:03:17 +0000
Commit:     John Baldwin <jhb at 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)


More information about the dev-commits-src-main mailing list