ACK: [PATCH] utilities: kernelscan: Add in missing [ ] brackets tokenisation
ivanhu
ivan.hu at canonical.com
Thu Jul 7 02:36:30 UTC 2016
On 2016年07月01日 18:14, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Forgot to handle [ ] tokenisation
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/utilities/kernelscan.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/utilities/kernelscan.c b/src/utilities/kernelscan.c
> index d1bebdd..aa4d819 100644
> --- a/src/utilities/kernelscan.c
> +++ b/src/utilities/kernelscan.c
> @@ -68,6 +68,8 @@ typedef enum {
> TOKEN_IDENTIFIER, /* identifier */
> TOKEN_PAREN_OPENED, /* ( */
> TOKEN_PAREN_CLOSED, /* ) */
> + TOKEN_SQUARE_OPENED, /* [ */
> + TOKEN_SQUARE_CLOSED, /* ] */
> TOKEN_CPP, /* # C pre-propressor */
> TOKEN_WHITE_SPACE, /* ' ', '\t', '\r', '\n' white space */
> TOKEN_LESS_THAN, /* < */
> @@ -777,6 +779,14 @@ static int get_token(parser *p, token *t)
> token_append(t, ch);
> t->type = TOKEN_PAREN_CLOSED;
> return PARSER_OK;
> + case '[':
> + token_append(t, ch);
> + t->type = TOKEN_SQUARE_OPENED;
> + return PARSER_OK;
> + case ']':
> + token_append(t, ch);
> + t->type = TOKEN_SQUARE_CLOSED;
> + return PARSER_OK;
> case '<':
> token_append(t, ch);
> t->type = TOKEN_LESS_THAN;
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list