Module Name:    src
Committed By:   kamil
Date:           Wed Apr  1 11:45:53 UTC 2020

Modified Files:
        src/sys/modules/examples/fopsmapper: fopsmapper.c

Log Message:
Avoid comparison between signed and unsigned integer

Cast PAGE_SIZE to size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/examples/fopsmapper/fopsmapper.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/examples/fopsmapper/fopsmapper.c
diff -u src/sys/modules/examples/fopsmapper/fopsmapper.c:1.1 src/sys/modules/examples/fopsmapper/fopsmapper.c:1.2
--- src/sys/modules/examples/fopsmapper/fopsmapper.c:1.1	Wed Apr  1 01:57:20 2020
+++ src/sys/modules/examples/fopsmapper/fopsmapper.c	Wed Apr  1 11:45:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fopsmapper.c,v 1.1 2020/04/01 01:57:20 kamil Exp $	*/
+/*	$NetBSD: fopsmapper.c,v 1.2 2020/04/01 11:45:53 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fopsmapper.c,v 1.1 2020/04/01 01:57:20 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fopsmapper.c,v 1.2 2020/04/01 11:45:53 kamil Exp $");
 
 #include <sys/module.h>
 #include <sys/param.h>
@@ -115,7 +115,7 @@ fopsmapper_mmap(file_t * fp, off_t * off
 	if (prot & PROT_EXEC)
 		return EACCES;
 
-	if (size != PAGE_SIZE)
+	if (size != (size_t)PAGE_SIZE)
 		return EINVAL;
 
 	if ((fo = fp->f_data) == NULL)

Reply via email to