mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
match: Reformat match_pattern
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
static int match_pattern(const char *s, const char *pattern, size_t limit)
|
||||
{
|
||||
bool had_asterisk = false;
|
||||
|
||||
if (s == NULL || pattern == NULL || limit <= 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -63,7 +64,7 @@ static int match_pattern(const char *s, const char *pattern, size_t limit)
|
||||
}
|
||||
|
||||
while (*pattern == '*') {
|
||||
/* Skip the asterisk. */
|
||||
/* Skip all the asterisks. */
|
||||
had_asterisk = true;
|
||||
pattern++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user