Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netsmb Change a few int -> size_t to make it compile on ...



details:   https://anonhg.NetBSD.org/src/rev/0ba727e44a20
branches:  trunk
changeset: 543209:0ba727e44a20
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Feb 19 12:01:37 2003 +0000

description:
Change a few int -> size_t to make it compile on archs where they are not
the same.

diffstat:

 sys/netsmb/iconv.c    |  10 ++++++----
 sys/netsmb/mchain.h   |   2 +-
 sys/netsmb/smb_subr.c |   6 +++---
 3 files changed, 10 insertions(+), 8 deletions(-)

diffs (68 lines):

diff -r c7a1c4d38a5d -r 0ba727e44a20 sys/netsmb/iconv.c
--- a/sys/netsmb/iconv.c        Wed Feb 19 12:01:17 2003 +0000
+++ b/sys/netsmb/iconv.c        Wed Feb 19 12:01:37 2003 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: iconv.c,v 1.5 2003/02/16 19:50:49 jdolecek Exp $       */
+/*     $NetBSD: iconv.c,v 1.6 2003/02/19 12:01:37 martin Exp $ */
 
 /* Public domain */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iconv.c,v 1.5 2003/02/16 19:50:49 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iconv.c,v 1.6 2003/02/19 12:01:37 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -51,7 +51,8 @@
 iconv_convstr(void *handle, char *dst, const char *src)
 {
        char *p = dst;
-       int inlen, outlen, error;
+       size_t inlen, outlen;
+       int error;
 
        if (handle == NULL) {
                strcpy(dst, src);
@@ -73,7 +74,8 @@
 {
        const char *s = src;
        char *d = dst;
-       int inlen, outlen, error;
+       size_t inlen, outlen;
+       int error;
 
        if (size == 0)
                return dst;
diff -r c7a1c4d38a5d -r 0ba727e44a20 sys/netsmb/mchain.h
--- a/sys/netsmb/mchain.h       Wed Feb 19 12:01:17 2003 +0000
+++ b/sys/netsmb/mchain.h       Wed Feb 19 12:01:37 2003 +0000
@@ -50,7 +50,7 @@
 struct mbuf;
 struct mbchain;
 
-typedef int mb_copy_t(struct mbchain *mbp, const caddr_t src, caddr_t dst, int len);
+typedef int mb_copy_t(struct mbchain *mbp, const caddr_t src, caddr_t dst, size_t len);
 
 struct mbchain {
        struct mbuf *   mb_top;         /* head of mbufs chain */
diff -r c7a1c4d38a5d -r 0ba727e44a20 sys/netsmb/smb_subr.c
--- a/sys/netsmb/smb_subr.c     Wed Feb 19 12:01:17 2003 +0000
+++ b/sys/netsmb/smb_subr.c     Wed Feb 19 12:01:37 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smb_subr.c,v 1.7 2003/02/18 10:18:53 jdolecek Exp $    */
+/*     $NetBSD: smb_subr.c,v 1.8 2003/02/19 12:01:37 martin Exp $      */
 
 /*
  * Copyright (c) 2000-2001 Boris Popov
@@ -311,9 +311,9 @@
 }
 
 static int
-smb_copy_iconv(struct mbchain *mbp, const caddr_t src, caddr_t dst, int len)
+smb_copy_iconv(struct mbchain *mbp, const caddr_t src, caddr_t dst, size_t len)
 {
-       int outlen = len;
+       size_t outlen = len;
 
        return iconv_conv((struct iconv_drv*)mbp->mb_udata, (const char **)(&src), &len, &dst, &outlen);
 }



Home | Main Index | Thread Index | Old Index