summaryrefslogtreecommitdiff
path: root/src/req.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-05 10:26:23 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-06 12:54:19 +0200
commit494d4d36237f37c455f6689fca280ed75498403a (patch)
treea4441786b9dc656910ed32bafdb5da93b73145e5 /src/req.cpp
parent6b20f4f6f46975eb5c0219e3b8a841a64643ce4b (diff)
Verious warnings generated by SunStudio fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/req.cpp')
-rw-r--r--src/req.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/req.cpp b/src/req.cpp
index 2e0e614..0094929 100644
--- a/src/req.cpp
+++ b/src/req.cpp
@@ -77,6 +77,8 @@ int xs::req_t::xsend (msg_t *msg_, int flags_)
int xs::req_t::xrecv (msg_t *msg_, int flags_)
{
+ int rc;
+
// If request wasn't send, we can't wait for reply.
if (!receiving_reply) {
errno = EFSM;
@@ -92,7 +94,7 @@ int xs::req_t::xrecv (msg_t *msg_, int flags_)
// TODO: This should also close the connection with the peer!
if (unlikely (!(msg_->flags () & msg_t::more) || msg_->size () != 0)) {
while (true) {
- int rc = xreq_t::xrecv (msg_, flags_);
+ rc = xreq_t::xrecv (msg_, flags_);
errno_assert (rc == 0);
if (!(msg_->flags () & msg_t::more))
break;
@@ -106,7 +108,7 @@ int xs::req_t::xrecv (msg_t *msg_, int flags_)
message_begins = false;
}
- int rc = xreq_t::xrecv (msg_, flags_);
+ rc = xreq_t::xrecv (msg_, flags_);
if (rc != 0)
return rc;