diff options
Diffstat (limited to 'cpukit/libcsupport/src/writev.c')
-rw-r--r-- | cpukit/libcsupport/src/writev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/writev.c b/cpukit/libcsupport/src/writev.c index 8dabe1d598..380e325365 100644 --- a/cpukit/libcsupport/src/writev.c +++ b/cpukit/libcsupport/src/writev.c @@ -73,10 +73,11 @@ ssize_t writev( all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { - if ( !iov[v].iov_base ) - rtems_set_errno_and_return_minus_one( EINVAL ); - - if ( iov[v].iov_len < 0 ) + /* + * iov[v].iov_len cannot be less than 0 because size_t is unsigned. + * So we only check for zero. + */ + if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) |