Module Name:    src
Committed By:   christos
Date:           Thu Sep 26 01:32:09 UTC 2019

Modified Files:
        src/sys/compat/netbsd32: netbsd32_fs.c netbsd32_rndpseudo_50.c
            netbsd32_socket.c

Log Message:
use size_t for counters (which are compared and set with unsigneds)


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/compat/netbsd32/netbsd32_fs.c
cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/netbsd32/netbsd32_socket.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/compat/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.84 src/sys/compat/netbsd32/netbsd32_fs.c:1.85
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.84	Sun Sep 22 18:59:38 2019
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.84 2019/09/22 22:59:38 christos Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.85 2019/09/26 01:32:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.84 2019/09/22 22:59:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.85 2019/09/26 01:32:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -139,7 +139,8 @@ dofilereadv32(int fd, struct file *fp, s
 	struct iovec *iov;
 	struct iovec *needfree;
 	struct iovec aiov[UIO_SMALLIOV];
-	long i, cnt, error = 0;
+	long i, error = 0;
+	size_t cnt;
 	u_int iovlen;
 	struct iovec *ktriov = NULL;
 
@@ -243,7 +244,8 @@ dofilewritev32(int fd, struct file *fp, 
 	struct iovec *iov;
 	struct iovec *needfree;
 	struct iovec aiov[UIO_SMALLIOV];
-	long i, cnt, error = 0;
+	long i, error = 0;
+	size_t cnt;
 	u_int iovlen;
 	struct iovec *ktriov = NULL;
 

Index: src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c
diff -u src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.3 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.4
--- src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c:1.3	Wed Jun 26 22:36:27 2019
+++ src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_rndpseudo_50.c,v 1.3 2019/06/27 02:36:27 christos Exp $	*/
+/*	$NetBSD: netbsd32_rndpseudo_50.c,v 1.4 2019/09/26 01:32:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_rndpseudo_50.c,v 1.3 2019/06/27 02:36:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_rndpseudo_50.c,v 1.4 2019/09/26 01:32:09 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -79,7 +79,7 @@ compat32_50_rnd_ioctl(struct file *fp, u
 	{
 		rndstat_t rstbuf = {.start = 0};
 		rndstat50_32_t *rst50_32 = (rndstat50_32_t *)addr;
-		int count;
+		size_t count;
 
 		if (rst50_32->count > RND_MAXSTATCOUNT50)
 			return (EINVAL);

Index: src/sys/compat/netbsd32/netbsd32_socket.c
diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.49 src/sys/compat/netbsd32/netbsd32_socket.c:1.50
--- src/sys/compat/netbsd32/netbsd32_socket.c:1.49	Wed Nov 14 12:51:37 2018
+++ src/sys/compat/netbsd32/netbsd32_socket.c	Wed Sep 25 21:32:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_socket.c,v 1.49 2018/11/14 17:51:37 hannken Exp $	*/
+/*	$NetBSD: netbsd32_socket.c,v 1.50 2019/09/26 01:32:09 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.49 2018/11/14 17:51:37 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.50 2019/09/26 01:32:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,11 +74,12 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_soc
 #define CMSG32_LEN(l)	(CMSG32_ALIGN(sizeof(struct cmsghdr)) + (l))
 
 static int
-copyout32_msg_control_mbuf(struct lwp *l, struct msghdr *mp, int *len,
+copyout32_msg_control_mbuf(struct lwp *l, struct msghdr *mp, u_int *len,
     struct mbuf *m, char **q, bool *truncated)
 {
 	struct cmsghdr *cmsg, cmsg32;
-	int i, j, error;
+	size_t i, j;
+	int error;
 
 	*truncated = false;
 	cmsg = mtod(m, struct cmsghdr *);

Reply via email to