Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 use size_t for counters (which are compa...
details: https://anonhg.NetBSD.org/src/rev/76015a9cec44
branches: trunk
changeset: 454707:76015a9cec44
user: christos <christos%NetBSD.org@localhost>
date: Thu Sep 26 01:32:09 2019 +0000
description:
use size_t for counters (which are compared and set with unsigneds)
diffstat:
sys/compat/netbsd32/netbsd32_fs.c | 10 ++++++----
sys/compat/netbsd32/netbsd32_rndpseudo_50.c | 6 +++---
sys/compat/netbsd32/netbsd32_socket.c | 9 +++++----
3 files changed, 14 insertions(+), 11 deletions(-)
diffs (98 lines):
diff -r 70b66213a394 -r 76015a9cec44 sys/compat/netbsd32/netbsd32_fs.c
--- a/sys/compat/netbsd32/netbsd32_fs.c Thu Sep 26 01:30:46 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_fs.c Thu Sep 26 01:32:09 2019 +0000
@@ -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 @@
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 @@
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;
diff -r 70b66213a394 -r 76015a9cec44 sys/compat/netbsd32/netbsd32_rndpseudo_50.c
--- a/sys/compat/netbsd32/netbsd32_rndpseudo_50.c Thu Sep 26 01:30:46 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_rndpseudo_50.c Thu Sep 26 01:32:09 2019 +0000
@@ -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 @@
{
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);
diff -r 70b66213a394 -r 76015a9cec44 sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c Thu Sep 26 01:30:46 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c Thu Sep 26 01:32:09 2019 +0000
@@ -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 @@
#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 *);
Home |
Main Index |
Thread Index |
Old Index