Diego Biurrun
2014-10-31 10:43:44 UTC
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Tue Oct 28 19:59:03 2014 +0100| [1ecbd379c4f9c768553bfc13ee0c9985fcef7b47] | committer: Diego Biurrun
libdvdcss: Avoid a cast when comparing the return values of write() and strlen()
src/libdvdcss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index a48a6ff..a602050 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -375,8 +375,8 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
i_fd = open( psz_tagfile, O_RDWR|O_CREAT, 0644 );
if( i_fd >= 0 )
{
- size_t len = strlen(psz_tag);
- if( write( i_fd, psz_tag, len ) < (long)len )
+ ssize_t len = strlen(psz_tag);
+ if( write( i_fd, psz_tag, len ) < len )
{
print_error( dvdcss,
"Error writing cache directory tag, continuing..\n" );
libdvdcss: Avoid a cast when comparing the return values of write() and strlen()
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=1ecbd379c4f9c768553bfc13ee0c9985fcef7b47
---src/libdvdcss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index a48a6ff..a602050 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -375,8 +375,8 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
i_fd = open( psz_tagfile, O_RDWR|O_CREAT, 0644 );
if( i_fd >= 0 )
{
- size_t len = strlen(psz_tag);
- if( write( i_fd, psz_tag, len ) < (long)len )
+ ssize_t len = strlen(psz_tag);
+ if( write( i_fd, psz_tag, len ) < len )
{
print_error( dvdcss,
"Error writing cache directory tag, continuing..\n" );