Skip to content

Commit

Permalink
Remove redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Oct 5, 2017
1 parent b3f8a5a commit b2ca410
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/addon/validation.cpp
Expand Up @@ -48,9 +48,8 @@ namespace {

bool addon_name_legal(const std::string& name)
{
if(name.empty() || name == "." ||
std::find_if(name.begin(), name.end(), addon_name_char_illegal()) != name.end() ||
name.find("..") != std::string::npos) {
if(name.empty() ||
std::find_if(name.begin(), name.end(), addon_name_char_illegal()) != name.end()) {
return false;
} else {
return true;
Expand Down

0 comments on commit b2ca410

Please sign in to comment.