aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/glob.h14
-rw-r--r--posix/regcomp.c20
-rw-r--r--posix/regexec.c14
-rw-r--r--posix/tst-spawn3.c4
-rw-r--r--posix/wordexp-test.c12
-rw-r--r--posix/wordexp.c8
-rw-r--r--posix/wordexp.h4
7 files changed, 38 insertions, 38 deletions
diff --git a/posix/glob.h b/posix/glob.h
index a5f3fe1..378b80a 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -54,14 +54,14 @@ typedef __SIZE_TYPE__ size_t;
# define GLOB_ONLYDIR (1 << 13)/* Match only directories. */
# define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error
if the user name is not available. */
-# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
- GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
- GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
- GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
+# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \
+ |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \
+ |GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE \
+ |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
#else
-# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
- GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
- GLOB_PERIOD)
+# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \
+ |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \
+ |GLOB_PERIOD)
#endif
/* Error returns from `glob'. */
diff --git a/posix/regcomp.c b/posix/regcomp.c
index cc85f35..7525355 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1800,8 +1800,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->word_char = 0;
#ifdef RE_ENABLE_I18N
token->mb_partial = 0;
- if (input->mb_cur_max > 1 &&
- !re_string_first_byte (input, re_string_cur_idx (input)))
+ if (input->mb_cur_max > 1
+ && !re_string_first_byte (input, re_string_cur_idx (input)))
{
token->type = CHARACTER;
token->mb_partial = 1;
@@ -1988,8 +1988,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->type = OP_PERIOD;
break;
case '^':
- if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
- re_string_cur_idx (input) != 0)
+ if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE))
+ && re_string_cur_idx (input) != 0)
{
char prev = re_string_peek_byte (input, -1);
if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
@@ -1999,8 +1999,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->opr.ctx_type = LINE_FIRST;
break;
case '$':
- if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
- re_string_cur_idx (input) + 1 != re_string_length (input))
+ if (!(syntax & RE_CONTEXT_INDEP_ANCHORS)
+ && re_string_cur_idx (input) + 1 != re_string_length (input))
{
re_token_t next;
re_string_skip_bytes (input, 1);
@@ -2034,8 +2034,8 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->opr.c = c;
#ifdef RE_ENABLE_I18N
- if (input->mb_cur_max > 1 &&
- !re_string_first_byte (input, re_string_cur_idx (input)))
+ if (input->mb_cur_max > 1
+ && !re_string_first_byte (input, re_string_cur_idx (input)))
{
token->type = CHARACTER;
return 1;
@@ -2333,8 +2333,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
FALLTHROUGH;
case OP_CLOSE_SUBEXP:
- if ((token->type == OP_CLOSE_SUBEXP) &&
- !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+ if ((token->type == OP_CLOSE_SUBEXP)
+ && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
{
*err = REG_ERPAREN;
return NULL;
diff --git a/posix/regexec.c b/posix/regexec.c
index 084b122..4ff30a7 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -2204,9 +2204,9 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
int naccepted;
/* Check the node can accept "multi byte". */
naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
- if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
- !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
- dfa->nexts[node_idx]))
+ if (naccepted > 0 && str_idx + naccepted <= max_str_idx
+ && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+ dfa->nexts[node_idx]))
/* The node can't accept the "multi byte", or the
destination was already thrown away, then the node
couldn't accept the current input "multi byte". */
@@ -3782,10 +3782,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
/* FIXME: I don't think this if is needed, as both '\n'
and '\0' are char_len == 1. */
/* '.' accepts any one character except the following two cases. */
- if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
- re_string_byte_at (input, str_idx) == '\n') ||
- ((dfa->syntax & RE_DOT_NOT_NULL) &&
- re_string_byte_at (input, str_idx) == '\0'))
+ if ((!(dfa->syntax & RE_DOT_NEWLINE)
+ && re_string_byte_at (input, str_idx) == '\n')
+ || ((dfa->syntax & RE_DOT_NOT_NULL)
+ && re_string_byte_at (input, str_idx) == '\0'))
return 0;
return char_len;
}
diff --git a/posix/tst-spawn3.c b/posix/tst-spawn3.c
index 8dae141..00c9470 100644
--- a/posix/tst-spawn3.c
+++ b/posix/tst-spawn3.c
@@ -84,8 +84,8 @@ do_test (void)
/* Executes a /bin/sh echo $$ 2>&1 > ${objpfx}tst-spawn3.pid . */
const char pidfile[] = OBJPFX "tst-spawn3.pid";
- if (posix_spawn_file_actions_addopen (&a, STDOUT_FILENO, pidfile, O_WRONLY |
- O_CREAT | O_TRUNC, 0644) != 0)
+ if (posix_spawn_file_actions_addopen (&a, STDOUT_FILENO, pidfile, O_WRONLY
+ | O_CREAT | O_TRUNC, 0644) != 0)
FAIL_EXIT1 ("posix_spawn_file_actions_addopen");
if (posix_spawn_file_actions_adddup2 (&a, STDOUT_FILENO, STDERR_FILENO) != 0)
diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c
index 0f2da81..10a0768 100644
--- a/posix/wordexp-test.c
+++ b/posix/wordexp-test.c
@@ -508,8 +508,8 @@ testit (struct test_case_struct *tc)
}
for (i = 0; i < we.we_wordc; ++i)
- if (we.we_wordv[i+start_offs] == NULL ||
- strcmp (tc->wordv[i], we.we_wordv[i+start_offs]) != 0)
+ if (we.we_wordv[i+start_offs] == NULL
+ || strcmp (tc->wordv[i], we.we_wordv[i+start_offs]) != 0)
{
bzzzt = 1;
break;
@@ -534,10 +534,10 @@ testit (struct test_case_struct *tc)
}
printf ("\n");
}
- else if (retval != 0 && retval != WRDE_NOSPACE &&
- (we.we_wordc != sav_we.we_wordc ||
- we.we_wordv != sav_we.we_wordv ||
- we.we_offs != sav_we.we_offs))
+ else if (retval != 0 && retval != WRDE_NOSPACE
+ && (we.we_wordc != sav_we.we_wordc
+ || we.we_wordv != sav_we.we_wordv
+ || we.we_offs != sav_we.we_offs))
{
bzzzt = 1;
printf ("FAILED to restore wordexp_t members\n");
diff --git a/posix/wordexp.c b/posix/wordexp.c
index 248de77..22c6d18 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -285,8 +285,8 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
for (i = 1 + *offset; words[i]; i++)
{
- if (words[i] == ':' || words[i] == '/' || words[i] == ' ' ||
- words[i] == '\t' || words[i] == 0 )
+ if (words[i] == ':' || words[i] == '/' || words[i] == ' '
+ || words[i] == '\t' || words[i] == 0 )
break;
if (words[i] == '\\')
@@ -1070,8 +1070,8 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
/* Chop off trailing newlines (required by POSIX.2) */
/* Ensure we don't go back further than the beginning of the
substitution (i.e. remove maxnewlines bytes at most) */
- while (maxnewlines-- != 0 &&
- *word_length > 0 && (*word)[*word_length - 1] == '\n')
+ while (maxnewlines-- != 0
+ && *word_length > 0 && (*word)[*word_length - 1] == '\n')
{
(*word)[--*word_length] = '\0';
diff --git a/posix/wordexp.h b/posix/wordexp.h
index 148b9e1..060f13f 100644
--- a/posix/wordexp.h
+++ b/posix/wordexp.h
@@ -33,8 +33,8 @@ enum
WRDE_REUSE = (1 << 3), /* Reuse storage in PWORDEXP. */
WRDE_SHOWERR = (1 << 4), /* Don't redirect stderr to /dev/null. */
WRDE_UNDEF = (1 << 5), /* Error for expanding undefined variables. */
- __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD |
- WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF)
+ __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD
+ | WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF)
};
/* Structure describing a word-expansion run. */