krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone
aa8144
commit 9baae41e14b825b487c80a743a21bfdf6175bd19
aa8144
Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
aa8144
Date:   Tue Jun 11 15:01:38 2019 -0300
aa8144
aa8144
    ras-mce-handler: fix mcgstatus message print
aa8144
    
aa8144
    As warned by clang, the test there is wrong:
aa8144
    
aa8144
    ras-mce-handler.c:344:9: warning: address of array 'e->mcgstatus_msg' will always evaluate to 'true' [-Wpointer-bool-conversion]
aa8144
            if (e->mcgstatus_msg)
aa8144
            ~~  ~~~^~~~~~~~~~~~~
aa8144
    
aa8144
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
aa8144
aa8144
---
aa8144
 ras-mce-handler.c |    2 +-
aa8144
 1 file changed, 1 insertion(+), 1 deletion(-)
aa8144
aa8144
--- rasdaemon-0.4.1.orig/ras-mce-handler.c	2020-01-10 10:03:09.990876004 -0500
aa8144
+++ rasdaemon-0.4.1/ras-mce-handler.c	2020-01-10 10:03:50.554469958 -0500
aa8144
@@ -334,7 +334,7 @@ #if 0
aa8144
 	if (e->status & MCI_STATUS_ADDRV)
aa8144
 		trace_seq_printf(s, ", addr= %llx", (long long)e->addr);
aa8144
 
aa8144
-	if (e->mcgstatus_msg)
aa8144
+	if (*e->mcgstatus_msg)
aa8144
 		trace_seq_printf(s, ", %s", e->mcgstatus_msg);
aa8144
 	else
aa8144
 		trace_seq_printf(s, ", mcgstatus= %llx",