Source-Changes-HG archive

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

[src/trunk]: src/dist/smbfs Replace some int's with size_t. Use %ld and cast ...



details:   https://anonhg.NetBSD.org/src/rev/3e93b35c6daf
branches:  trunk
changeset: 543221:3e93b35c6daf
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Feb 19 16:53:26 2003 +0000

description:
Replace some int's with size_t. Use %ld and cast to long when printing
size_t's.

diffstat:

 dist/smbfs/include/netsmb/smb_lib.h |   4 ++--
 dist/smbfs/lib/smb/nls.c            |  12 ++++++------
 dist/smbfs/lib/smb/rcfile.c         |   2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diffs (75 lines):

diff -r 105ff36f3a1f -r 3e93b35c6daf dist/smbfs/include/netsmb/smb_lib.h
--- a/dist/smbfs/include/netsmb/smb_lib.h       Wed Feb 19 15:43:56 2003 +0000
+++ b/dist/smbfs/include/netsmb/smb_lib.h       Wed Feb 19 16:53:26 2003 +0000
@@ -244,8 +244,8 @@
 int   nls_setlocale(const char *);
 char* nls_str_toext(char *, const char *);
 char* nls_str_toloc(char *, const char *);
-void* nls_mem_toext(void *, const void *, int);
-void* nls_mem_toloc(void *, const void *, int);
+void* nls_mem_toext(void *, const void *, size_t);
+void* nls_mem_toloc(void *, const void *, size_t);
 char* nls_str_upper(char *, const char *);
 char* nls_str_lower(char *, const char *);
 
diff -r 105ff36f3a1f -r 3e93b35c6daf dist/smbfs/lib/smb/nls.c
--- a/dist/smbfs/lib/smb/nls.c  Wed Feb 19 15:43:56 2003 +0000
+++ b/dist/smbfs/lib/smb/nls.c  Wed Feb 19 16:53:26 2003 +0000
@@ -125,7 +125,7 @@
 nls_str_toloc(char *dst, const char *src)
 {
        char *p = dst;
-       int inlen, outlen;
+       size_t inlen, outlen;
 
        if (!iconv_loaded)
                return strcpy(dst, src);
@@ -147,7 +147,7 @@
 nls_str_toext(char *dst, const char *src)
 {
        char *p = dst;
-       int inlen, outlen;
+       size_t inlen, outlen;
 
        if (!iconv_loaded)
                return strcpy(dst, src);
@@ -166,11 +166,11 @@
 }
 
 void *
-nls_mem_toloc(void *dst, const void *src, int size)
+nls_mem_toloc(void *dst, const void *src, size_t size)
 {
        char *p = dst;
        const char *s = src;
-       int inlen, outlen;
+       size_t inlen, outlen;
 
        if (!iconv_loaded)
                return memcpy(dst, src, size);
@@ -191,11 +191,11 @@
 }
 
 void *
-nls_mem_toext(void *dst, const void *src, int size)
+nls_mem_toext(void *dst, const void *src, size_t size)
 {
        char *p = dst;
        const char *s = src;
-       int inlen, outlen;
+       size_t inlen, outlen;
 
        if (size == 0)
                return NULL;
diff -r 105ff36f3a1f -r 3e93b35c6daf dist/smbfs/lib/smb/rcfile.c
--- a/dist/smbfs/lib/smb/rcfile.c       Wed Feb 19 15:43:56 2003 +0000
+++ b/dist/smbfs/lib/smb/rcfile.c       Wed Feb 19 16:53:26 2003 +0000
@@ -344,7 +344,7 @@
        if (error)
                return error;
        if (strlen(value) >= maxlen) {
-               warnx("line too long for key '%s' in section '%s', max = %d\n", key, section, maxlen);
+               warnx("line too long for key '%s' in section '%s', max = %ld\n", key, section, (long)maxlen);
                return EINVAL;
        }
        strcpy(dest, value);



Home | Main Index | Thread Index | Old Index