summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-30 13:13:49 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-30 13:13:49 +0300
commit6e655f34698a91be8c7059648cf15d5e8ed11817 (patch)
tree0316b714f14df1ce722bffe6c961e367f23a0658
parent8340a951092c57bdfafd2cc68e1c9b504a4013f9 (diff)
downloadapt-6e655f34698a91be8c7059648cf15d5e8ed11817.tar.gz
Move unused variable
-rw-r--r--apt-pkg/contrib/srvrec.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc
index 522e8ab9c..cdbf2941f 100644
--- a/apt-pkg/contrib/srvrec.cc
+++ b/apt-pkg/contrib/srvrec.cc
@@ -44,7 +44,6 @@ bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result)
}
std::string target;
- int res;
struct servent s_ent_buf;
struct servent *s_ent = nullptr;
std::vector<char> buf(1024);
@@ -54,7 +53,7 @@ bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result)
if (s_ent == nullptr)
return false;
#else
- res = getservbyport_r(htons(port), "tcp", &s_ent_buf, buf.data(), buf.size(), &s_ent);
+ int res = getservbyport_r(htons(port), "tcp", &s_ent_buf, buf.data(), buf.size(), &s_ent);
if (res != 0 || s_ent == nullptr)
return false;
#endif