summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-04-06 16:05:36 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-04-06 16:05:36 (GMT)
commit5ad17757f72e1723f7d51b0d0f8c779c5fbcd9f2 (patch)
treec40aee19d26ae21e840fc48ba8ce642ddf224cfb
parent1f8cdf58c3a42ccccfa33516d528b000aee0a53e (diff)
cleanup handshake code slightly.
-rw-r--r--src/network/handshake.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/handshake.cpp b/src/network/handshake.cpp
index d2dcf2d..2845db7 100644
--- a/src/network/handshake.cpp
+++ b/src/network/handshake.cpp
@@ -141,9 +141,9 @@ bool handshake::lookup_external(const std::string& website,
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response_buffer);
curl_easy_setopt(curl, CURLOPT_URL, website.c_str());
// Everything fine. Do fetch
- CURLcode result = curl_easy_perform(curl);
+ CURLcode web_success = curl_easy_perform(curl);
curl_easy_cleanup(curl);
- if (result != CURLE_OK)
+ if (web_success != CURLE_OK)
return false;
// TODO use std::regex instead ... when it work >_>
boost::cmatch results;
@@ -153,8 +153,8 @@ bool handshake::lookup_external(const std::string& website,
return false;
}
ip = localhost_ip();
- for (int i = 0; i < 4; ++i)
- ip[i + 12] = boost::lexical_cast<unsigned>(results[i + 1]);
+ for (size_t i = 0; i < 4; ++i)
+ ip[i + 12] = boost::lexical_cast<unsigned int>(results[i + 1]);
return true;
}