Skip to content

Commit 6c3a529

Browse files
committed
chore: formated code using clang-format
Formated fnmatch c and h files and test files using clang-format Signed-off-by: Harun Spago <harun.spago.code@gmail.com>
1 parent 68bcf57 commit 6c3a529

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

include/zephyr/posix/fnmatch.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
#define FNM_NOSYS 2 /* Function not implemented. */
4141
#define FNM_NORES 3 /* Out of resources */
4242

43-
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
44-
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
45-
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
46-
#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */
43+
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
44+
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
45+
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
46+
#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */
4747
#define FNM_LEADING_DIR 0x10 /* Ignore /<tail> after Imatch. */
4848

4949
#ifdef __cplusplus
@@ -52,7 +52,7 @@ extern "C" {
5252

5353
/**
5454
* Function used to check if the given pattern is in the string, using the given flags
55-
*
55+
*
5656
* @param pattern pattern that is matched against the string
5757
* @param string string that is checked for the pattern
5858
* @param flags used to signal special matching conditions
@@ -61,8 +61,8 @@ extern "C" {
6161
* FNM_PERIOD 0x04 Period must be matched by period.
6262
* FNM_CASEFOLD 0x08 Pattern is matched case-insensitive
6363
* FNM_LEADING_DIR 0x10 Ignore /<tail> after Imatch.
64-
*
65-
*
64+
*
65+
*
6666
* @return int
6767
* @retval 0 pattern found in string
6868
* @retval FNM_NOMATCH pattern not found in string

tests/posix/c_lib_ext/src/fnmatch.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ ZTEST(posix_c_lib_ext, test_fnmatch)
7878
zassert_ok(fnmatch("*[[:lower:]]", "z", 0));
7979
zassert_ok(fnmatch("*[[:upper:]]", "G", 0));
8080
zassert_ok(fnmatch("*[[:space:]]", " ", 0));
81-
zassert_ok(fnmatch("*[[:alpha:]]/""*[[:alnum:]]", "a/b", FNM_PATHNAME));
81+
zassert_ok(fnmatch("*[[:alpha:]]/"
82+
"*[[:alnum:]]",
83+
"a/b", FNM_PATHNAME));
8284
zassert_not_equal(fnmatch("*[![:digit:]]*/[![:d-d]", "a/b", FNM_PATHNAME), 0);
8385
zassert_not_equal(fnmatch("*[![:digit:]]*/[[:d-d]", "a/[", FNM_PATHNAME), 0);
8486
zassert_not_equal(fnmatch("*[![:digit:]]*/[![:d-d]", "a/[", FNM_PATHNAME), 0);

0 commit comments

Comments
 (0)