summaryrefslogtreecommitdiff
path: root/file_io/os2/readwrite.c
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-11-07 20:21:48 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-11-07 20:21:48 +0000
commit17a3882ace13e04742d9022ec3893add07b042d6 (patch)
treedfe2ebe5403f257ce127363be9175da615e14e35 /file_io/os2/readwrite.c
parent6b90edbace942d758daac16b43836ec9dcaaed89 (diff)
downloadlibapr-17a3882ace13e04742d9022ec3893add07b042d6.tar.gz
Convert a lot of apr_ssize_t to apr_size_t. We don't ever accept or return
signed values in these integers, and we return the error codes directly, so we should always report the number of bytes read/written correctly. If we have an error, that is 0 bytes. If that is true, then using signed values doesn't make any sense. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60642 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2/readwrite.c')
-rw-r--r--file_io/os2/readwrite.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index 4794232c7..d4816c50a 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -62,7 +62,7 @@
#include <os2.h>
#include <malloc.h>
-apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_ssize_t *nbytes)
+apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
{
ULONG rc = 0;
ULONG bytesread;
@@ -138,7 +138,7 @@ apr_status_t apr_read(apr_file_t *thefile, void *buf, apr_ssize_t *nbytes)
-apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_ssize_t *nbytes)
+apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
{
ULONG rc = 0;
ULONG byteswritten;
@@ -194,7 +194,7 @@ apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_ssize_t *nbytes
#ifdef HAVE_WRITEV
-apr_status_t apr_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_ssize_t *nbytes)
+apr_status_t apr_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
{
int bytes;
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
@@ -266,7 +266,7 @@ apr_status_t apr_getc(char *ch, apr_file_t *thefile)
apr_status_t apr_puts(const char *str, apr_file_t *thefile)
{
- apr_ssize_t len;
+ apr_size_t len;
len = strlen(str);
return apr_write(thefile, str, &len);
@@ -301,7 +301,7 @@ apr_status_t apr_flush(apr_file_t *thefile)
apr_status_t apr_fgets(char *str, int len, apr_file_t *thefile)
{
- ssize_t readlen;
+ size_t readlen;
apr_status_t rv = APR_SUCCESS;
int i;