mirror of https://gitee.com/bigwinds/arangodb
cppcheck
This commit is contained in:
parent
cd377b0e0b
commit
f94ef035cb
|
@ -345,7 +345,7 @@ HexHashResult AuthInfo::hexHashFromData(std::string const& hashMethod, char cons
|
|||
}
|
||||
|
||||
if (crypted == nullptr ||
|
||||
cryptedLength <= 0) {
|
||||
cryptedLength == 0) {
|
||||
delete[] crypted;
|
||||
return HexHashResult(TRI_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@ enum class AuthSource {
|
|||
|
||||
class HexHashResult : public arangodb::Result {
|
||||
public:
|
||||
HexHashResult(int errorNumber) : Result(errorNumber) {}
|
||||
HexHashResult(std::string const& hexHash) : Result(0), _hexHash(hexHash) {}
|
||||
explicit HexHashResult(int errorNumber) : Result(errorNumber) {}
|
||||
explicit HexHashResult(std::string const& hexHash) : Result(0), _hexHash(hexHash) {}
|
||||
std::string const& hexHash() { return _hexHash; }
|
||||
|
||||
protected:
|
||||
|
@ -64,7 +64,12 @@ class HexHashResult : public arangodb::Result {
|
|||
|
||||
class AuthEntry {
|
||||
public:
|
||||
AuthEntry() : _active(false), _mustChange(false), _allDatabases(AuthLevel::NONE) {}
|
||||
AuthEntry()
|
||||
: _active(false),
|
||||
_mustChange(false),
|
||||
_created(TRI_microtime()),
|
||||
_source(AuthSource::COLLECTION),
|
||||
_allDatabases(AuthLevel::NONE) {}
|
||||
|
||||
AuthEntry(std::string&& username, std::string&& passwordMethod,
|
||||
std::string&& passwordSalt, std::string&& passwordHash,
|
||||
|
|
Loading…
Reference in New Issue