[Crash-utility] [PATCH RFC 06/14] lkcd_v1: address of an array always evaluates to true

Oleksandr Natalenko oleksandr at redhat.com
Fri Oct 27 08:23:12 UTC 2017


Signed-off-by: Oleksandr Natalenko <oleksandr at redhat.com>
---
 lkcd_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lkcd_v1.c b/lkcd_v1.c
index 5f891ae..499f146 100644
--- a/lkcd_v1.c
+++ b/lkcd_v1.c
@@ -249,7 +249,7 @@ dump_header_only:
         lkcd_print("          dh_eip: %lx\n", dh->dh_eip);
 	lkcd_print("    dh_num_pages: %d\n", dh->dh_num_pages);
         lkcd_print(" dh_panic_string: %s%s", dh->dh_panic_string,
-		dh && dh->dh_panic_string &&
+		dh && *dh->dh_panic_string &&
 		strstr(dh->dh_panic_string, "\n") ? "" : "\n");
         lkcd_print("         dh_time: %s\n",
                         strip_linefeeds(ctime(&(dh->dh_time.tv_sec))));
-- 
2.14.3




More information about the Crash-utility mailing list