From fc2307d47c525fb87bbfb166cfd35a2a2c0e9f56 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 31 Mar 2006 16:15:23 +0000 Subject: * src/Util.cc (isPowerOf): New function. * src/Util.h (isPowerOf): New function. * src/PeerMessageUtil.cc (checkLength): Added a check for length whether or not it is power of 2. --- src/FtpConnection.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/FtpConnection.cc') diff --git a/src/FtpConnection.cc b/src/FtpConnection.cc index dac5a387..e265beb1 100644 --- a/src/FtpConnection.cc +++ b/src/FtpConnection.cc @@ -108,7 +108,7 @@ void FtpConnection::sendRetr() const { socket->writeData(request); } -int FtpConnection::getStatus(string response) const { +int FtpConnection::getStatus(const string& response) const { int status; // When the response is not like "%d %*s", // we return 0. @@ -123,7 +123,7 @@ int FtpConnection::getStatus(string response) const { } } -bool FtpConnection::isEndOfResponse(int status, string response) const { +bool FtpConnection::isEndOfResponse(int status, const string& response) const { if(response.size() <= 4) { return false; } -- cgit