poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] poke: Compare str pointer with NULL


From: Mohammad-Reza Nabipoor
Subject: [PATCH 1/2] poke: Compare str pointer with NULL
Date: Mon, 24 Jan 2022 21:32:49 +0330

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 (&regexp,                                         \
                        PK_CMD_ARG_STR (argv[1]),                        \
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]