Replace some int's with size_t. Use %ld and cast to long when printing
size_t's.
This commit is contained in:
parent
cfa07275ad
commit
93f473507c
4
dist/smbfs/include/netsmb/smb_lib.h
vendored
4
dist/smbfs/include/netsmb/smb_lib.h
vendored
@ -244,8 +244,8 @@ int nls_setrecode(const char *, const char *);
|
||||
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 *);
|
||||
|
||||
|
12
dist/smbfs/lib/smb/nls.c
vendored
12
dist/smbfs/lib/smb/nls.c
vendored
@ -125,7 +125,7 @@ char *
|
||||
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 @@ char *
|
||||
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 @@ nls_str_toext(char *dst, const char *src)
|
||||
}
|
||||
|
||||
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 @@ nls_mem_toloc(void *dst, const void *src, int size)
|
||||
}
|
||||
|
||||
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;
|
||||
|
2
dist/smbfs/lib/smb/rcfile.c
vendored
2
dist/smbfs/lib/smb/rcfile.c
vendored
@ -344,7 +344,7 @@ rc_getstring(struct rcfile *rcp, const char *section, const char *key,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user