ACK: [PATCH] utilities: kernelscan: Add in missing [ ] brackets tokenisation
Alex Hung
alex.hung at canonical.com
Wed Jul 6 01:49:16 UTC 2016
On 2016-07-01 06:14 PM, 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: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list