diff options
author | Jack Lloyd <[email protected]> | 2017-09-22 20:23:00 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-22 20:23:00 -0400 |
commit | 3464804dbad8fdc44500082b224c54704cf2fcf6 (patch) | |
tree | c525a2fc9493f3e97356bd246e45e6293737ed0f /src | |
parent | d7330e586aee1912838952c6583d9449060d776a (diff) |
Avoid GCC signed-overflow warning
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/x509/name_constraint.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/x509/name_constraint.cpp b/src/lib/x509/name_constraint.cpp index ea922a3b9..98f5e05a7 100644 --- a/src/lib/x509/name_constraint.cpp +++ b/src/lib/x509/name_constraint.cpp @@ -194,7 +194,7 @@ bool GeneralName::matches_dn(const std::string& nam) const auto attr = nam_dn.get_attributes(); bool ret = true; - int trys = 0; + size_t trys = 0; for(const std::pair<OID,std::string>& c: my_dn.get_attributes()) { @@ -203,7 +203,7 @@ bool GeneralName::matches_dn(const std::string& nam) const if(i.first != i.second) { trys += 1; - ret &= i.first->second == c.second; + ret = ret && (i.first->second == c.second); } } |