diff options
author | imura <imura@FreeBSD.org> | 2005-06-05 02:09:48 +0000 |
---|---|---|
committer | imura <imura@FreeBSD.org> | 2005-06-05 02:09:48 +0000 |
commit | 5809391d171495137ad34f9b053bf4205220d45b (patch) | |
tree | afeeb652447b1ec4b3ea7008ef3d82fef7d72af4 /sys/fs | |
parent | 1d64a7af3103ca314acdafef71a0354b4aec086e (diff) | |
download | FreeBSD-src-5809391d171495137ad34f9b053bf4205220d45b.zip FreeBSD-src-5809391d171495137ad34f9b053bf4205220d45b.tar.gz |
Avoid casting from (int *) to (size_t *) in order to fix udf_iconv on amd64.
Reviewed by: scottl
MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/udf/udf_vnops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index c428305..a3f6e3d 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -373,7 +373,8 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) { unicode_t *transname; char *unibuf, *unip; - int i, unilen = 0, destlen; + int i, destlen; + ssize_t unilen = 0; size_t destleft = MAXNAMLEN; /* Convert 16-bit Unicode to destname */ @@ -381,7 +382,7 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) /* allocate a buffer big enough to hold an 8->16 bit expansion */ unibuf = uma_zalloc(udf_zone_trans, M_WAITOK); unip = unibuf; - if ((unilen = udf_UncompressUnicodeByte(len, cs0string, unibuf)) == -1) { + if ((unilen = (ssize_t)udf_UncompressUnicodeByte(len, cs0string, unibuf)) == -1) { printf("udf: Unicode translation failed\n"); uma_zfree(udf_zone_trans, unibuf); return 0; @@ -405,7 +406,7 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) /* allocate a buffer big enough to hold an 8->16 bit expansion */ transname = uma_zalloc(udf_zone_trans, M_WAITOK); - if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { + if ((unilen = (ssize_t)udf_UncompressUnicode(len, cs0string, transname)) == -1) { printf("udf: Unicode translation failed\n"); uma_zfree(udf_zone_trans, transname); return 0; @@ -420,7 +421,7 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) } uma_zfree(udf_zone_trans, transname); destname[unilen] = 0; - destlen = unilen; + destlen = (int)unilen; } return (destlen); |