Browse Source

Minor changes based on cppcheck output.

pull/228/head
EinMByte 9 years ago
parent
commit
4ce7b0e9ef
  1. 8
      Daemon.h
  2. 1
      I2NPProtocol.h
  3. 2
      RouterInfo.cpp
  4. 1
      RouterInfo.h
  5. 1
      TODO
  6. 2
      util.cpp

8
Daemon.h

@ -53,6 +53,8 @@ namespace i2p @@ -53,6 +53,8 @@ namespace i2p
class DaemonLinux : public Daemon_Singleton
{
public:
DeamonLinux() = default;
static DaemonLinux& Instance()
{
static DaemonLinux instance;
@ -61,9 +63,9 @@ namespace i2p @@ -61,9 +63,9 @@ namespace i2p
virtual bool start();
virtual bool stop();
private:
std::string pidfile;
int pidFilehandle;
private:
std::string pidfile;
int pidFilehandle;
};
#endif

1
I2NPProtocol.h

@ -160,6 +160,7 @@ namespace tunnel @@ -160,6 +160,7 @@ namespace tunnel
memcpy (buf + offset, other.buf + other.offset, other.GetLength ());
len = offset + other.GetLength ();
from = other.from;
maxLen = other.maxLen;
return *this;
}

2
RouterInfo.cpp

@ -287,7 +287,7 @@ namespace data @@ -287,7 +287,7 @@ namespace data
if (m_Caps & eReachable) caps += CAPS_FLAG_REACHABLE; // reachable
if (m_Caps & eUnreachable) caps += CAPS_FLAG_UNREACHABLE; // unreachable
SetProperty ("caps", caps.c_str ());
SetProperty ("caps", caps);
}
void RouterInfo::WriteToStream (std::ostream& s)

1
RouterInfo.h

@ -87,6 +87,7 @@ namespace data @@ -87,6 +87,7 @@ namespace data
RouterInfo (const std::string& fullPath);
RouterInfo (): m_Buffer (nullptr) { };
RouterInfo (const RouterInfo& ) = default;
RouterInfo& operator=(const RouterInfo& ) = default;
RouterInfo (const uint8_t * buf, int len);

1
TODO

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
Short-term refactoring:
- SSUSession:637, SSUSession:635 get rid of casting to SSUHeader
- Idenity.cpp:156 check for self asignment
Long-term refactoring:
- Rely on a library for TLS and SSL.

2
util.cpp

@ -472,7 +472,7 @@ namespace http @@ -472,7 +472,7 @@ namespace http
try{
port_ = boost::lexical_cast<decltype(port_)>(portstr_);
}
catch (std::exception e) {
catch (const std::exception& e) {
port_ = 80;
}
}

Loading…
Cancel
Save