mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 22:59:34 +08:00
Refactor tags_check_symbol function for clarity
This commit is contained in:
@@ -64,10 +64,10 @@ static bool tags_check_symbol(const char *tags)
|
||||
{
|
||||
for (size_t i = 0; i < strlen(tags); i++) {
|
||||
char c = tags[i];
|
||||
if (c == '^' || c == '=' || c == '[' || c == ']' || c == '{' ||
|
||||
c == '}' || c == ';' || c == ':' || c == '\'' || c == '"' ||
|
||||
c == '<' || c == '>' || c == '?' || c == '\\' || c == '|' ||
|
||||
c == '~' || c == '`' || c == '\t' || c == '\n') {
|
||||
if (c == '[' || c == ']' || c == '{' || c == '}' || c == ';' ||
|
||||
c == ':' || c == '\'' || c == '"' || c == '<' || c == '>' ||
|
||||
c == '?' || c == '\\' || c == '|' || c == '`' || c == '\t' ||
|
||||
c == '\n') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -746,4 +746,4 @@ void handle_put_node_tag(nng_aio *aio)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user