[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] poke: Compare str pointer with NULL
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH 1/2] poke: Compare str pointer with NULL |
Date: |
Mon, 24 Jan 2022 19:53:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Mohammad.
OK for both master and maint/poke-2.
Thanks!
> 2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Compare the string pointer
> with NULL, not '\0'.
> ---
> ChangeLog | 5 +++++
> poke/pk-cmd-def.c | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index be7ddfb3..a79a1b00 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
> +
> + * poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Compare the string pointer
> + with NULL, not '\0'.
> +
> 2022-01-24 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * common/pk-utils.h (pk_print_binary): Add new param `use_suffix_p`.
> diff --git a/poke/pk-cmd-def.c b/poke/pk-cmd-def.c
> index 0847b392..fa55f3cb 100644
> --- a/poke/pk-cmd-def.c
> +++ b/poke/pk-cmd-def.c
> @@ -146,7 +146,7 @@ print_type_decl (int kind,
> #define PREP_REGEXP_PAYLOAD \
> do \
> { \
> - if (PK_CMD_ARG_STR (argv[1]) != '\0') \
> + if (PK_CMD_ARG_STR (argv[1]) != NULL) \
> { \
> if (regcomp (®exp, \
> PK_CMD_ARG_STR (argv[1]), \