Skip to content

Commit 86a61ed

Browse files
committed
merge if statements
1 parent 5998c8c commit 86a61ed

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/pb_utils.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,9 @@ WrapTritonErrorInSharedPtr(TRITONSERVER_Error* error)
327327
bool
328328
IsValidIdentifier(const std::string& input)
329329
{
330-
if (input.empty()) {
331-
return false;
332-
}
333-
334330
// Check for invalid characters
335-
if (input.find_first_of(INVALID_CHARS) != std::string::npos) {
331+
if (input.empty() ||
332+
input.find_first_of(INVALID_CHARS) != std::string::npos) {
336333
return false;
337334
}
338335

0 commit comments

Comments
 (0)