summaryrefslogtreecommitdiff
path: root/ace/SOCK_IO.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-22 19:12:24 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-22 19:12:24 +0000
commite23366181cb87e4bbbb90c9fb15cf1ef41618f93 (patch)
tree8223fe34197cbcaf6cc056367109d59b91802b68 /ace/SOCK_IO.cpp
parent67058e37923cba59203be9b005a84082099ac0f0 (diff)
downloadATCD-e23366181cb87e4bbbb90c9fb15cf1ef41618f93.tar.gz
es
Diffstat (limited to 'ace/SOCK_IO.cpp')
-rw-r--r--ace/SOCK_IO.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp
index 2be8c8ce329..5a2e9090046 100644
--- a/ace/SOCK_IO.cpp
+++ b/ace/SOCK_IO.cpp
@@ -52,11 +52,10 @@ ACE_SOCK_IO::send (size_t n, ...) const
va_list argp;
size_t total_tuples = n / 2;
- ssize_t result;
+ iovec *iovp;
#if defined (ACE_HAS_ALLOCA)
- iovec *iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
+ iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
#else
- iovec *iovp;
ACE_NEW_RETURN (iovp, iovec[total_tuples], -1);
#endif /* !defined (ACE_HAS_ALLOCA) */
@@ -68,7 +67,7 @@ ACE_SOCK_IO::send (size_t n, ...) const
iovp[i].iov_len = va_arg (argp, int);
}
- result = ACE_OS::writev (this->get_handle (), iovp, total_tuples);
+ ssize_t result = ACE_OS::writev (this->get_handle (), iovp, total_tuples);
#if !defined (ACE_HAS_ALLOCA)
delete [] iovp;
#endif /* !defined (ACE_HAS_ALLOCA) */
@@ -88,13 +87,11 @@ ACE_SOCK_IO::recv (size_t n, ...) const
ACE_TRACE ("ACE_SOCK_IO::recv");
va_list argp;
- size_t total_tuples = n / 2;
- ssize_t result;
+ size_t total_tuples = n / 2;
+ iovec *iovp;
#if defined (ACE_HAS_ALLOCA)
- iovec *iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
+ iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
#else
- iovec *iovp;
-
ACE_NEW_RETURN (iovp, iovec[total_tuples], -1);
#endif /* !defined (ACE_HAS_ALLOCA) */
@@ -106,7 +103,7 @@ ACE_SOCK_IO::recv (size_t n, ...) const
iovp[i].iov_len = va_arg (argp, int);
}
- result = ACE_OS::readv (this->get_handle (), iovp, total_tuples);
+ ssize_t result = ACE_OS::readv (this->get_handle (), iovp, total_tuples);
#if !defined (ACE_HAS_ALLOCA)
delete [] iovp;
#endif /* !defined (ACE_HAS_ALLOCA) */