From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
To: "Yi, EungJun" <semtlenori@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] compat/regex: fix typos in comments.
Date: Sun, 06 May 2012 17:07:21 +0200 [thread overview]
Message-ID: <4FA693A9.20101@in.waw.pl> (raw)
In-Reply-To: <1336308300-4858-1-git-send-email-semtlenori@gmail.com>
On 05/06/2012 02:45 PM, Yi, EungJun wrote:
> From: "Yi, EungJun" <semtlenori@gmail.com>
>
> occured => occurred
>
> Signed-off-by: Yi, EungJun <semtlenori@gmail.com>
> ---
> compat/regex/regcomp.c | 4 ++--
> compat/regex/regex_internal.c | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
> index 8c96ed9..aab8153 100644
> --- a/compat/regex/regcomp.c
> +++ b/compat/regex/regcomp.c
> @@ -2095,7 +2095,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
>
> /* Entry point of the parser.
> Parse the regular expression REGEXP and return the structure tree.
> - If an error is occured, ERR is set by error code, and return NULL.
> + If an error is occurred, ERR is set by error code, and return NULL.
Hi,
you might want to fix the grammatical errors instead:
"If an error occurs, ERR is set to the error code, and NULL is
returned.", or something like that, I haven't actually read the code.
Best,
Zbyszek
> This function build the following tree, from regular expression <reg_exp>:
> CAT
> / \
> @@ -3715,7 +3715,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
> /* This is intended for the expressions like "a{1,3}".
> Fetch a number from `input', and return the number.
> Return -1, if the number field is empty like "{,1}".
> - Return -2, If an error is occured. */
> + Return -2, If an error is occurred. */
>
> static int
> fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
> diff --git a/compat/regex/regex_internal.c b/compat/regex/regex_internal.c
> index 193854c..237642c 100644
> --- a/compat/regex/regex_internal.c
> +++ b/compat/regex/regex_internal.c
> @@ -1284,7 +1284,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
>
> /* Insert the new element ELEM to the re_node_set* SET.
> SET should not already have ELEM.
> - return -1 if an error is occured, return 1 otherwise. */
> + return -1 if an error is occurred, return 1 otherwise. */
>
> static int
> internal_function
> @@ -1341,7 +1341,7 @@ re_node_set_insert (re_node_set *set, int elem)
>
> /* Insert the new element ELEM to the re_node_set* SET.
> SET should not already have any element greater than or equal to ELEM.
> - Return -1 if an error is occured, return 1 otherwise. */
> + Return -1 if an error is occurred, return 1 otherwise. */
>
> static int
> internal_function
> @@ -1416,7 +1416,7 @@ re_node_set_remove_at (re_node_set *set, int idx)
> \f
>
> /* Add the token TOKEN to dfa->nodes, and return the index of the token.
> - Or return -1, if an error will be occured. */
> + Or return -1, if an error will be occurred. */
>
> static int
> internal_function
prev parent reply other threads:[~2012-05-06 15:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 12:45 [PATCH] compat/regex: fix typos in comments Yi, EungJun
2012-05-06 12:55 ` Ævar Arnfjörð Bjarmason
2012-05-06 13:40 ` Yi, EungJun
2012-05-06 15:18 ` Ævar Arnfjörð Bjarmason
2012-05-06 15:07 ` Zbigniew Jędrzejewski-Szmek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA693A9.20101@in.waw.pl \
--to=zbyszek@in.waw.pl \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=semtlenori@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).