aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/util/swrite.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/swrite.cc')
-rw-r--r--src/util/swrite.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/swrite.cc b/src/util/swrite.cc
index 26910ff..56d07fc 100644
--- a/src/util/swrite.cc
+++ b/src/util/swrite.cc
@@ -25,7 +25,7 @@
int swrite( int fd, const char *str, ssize_t len )
{
ssize_t total_bytes_written = 0;
- ssize_t bytes_to_write = ( len >= 0 ) ? len : strlen( str );
+ ssize_t bytes_to_write = ( len >= 0 ) ? len : (ssize_t) strlen( str );
while ( total_bytes_written < bytes_to_write ) {
ssize_t bytes_written = write( fd, str + total_bytes_written,
bytes_to_write - total_bytes_written );