krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone
Blob Blame History Raw
commit 9baae41e14b825b487c80a743a21bfdf6175bd19
Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Date:   Tue Jun 11 15:01:38 2019 -0300

    ras-mce-handler: fix mcgstatus message print
    
    As warned by clang, the test there is wrong:
    
    ras-mce-handler.c:344:9: warning: address of array 'e->mcgstatus_msg' will always evaluate to 'true' [-Wpointer-bool-conversion]
            if (e->mcgstatus_msg)
            ~~  ~~~^~~~~~~~~~~~~
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

---
 ras-mce-handler.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- rasdaemon-0.4.1.orig/ras-mce-handler.c	2020-01-10 10:03:09.990876004 -0500
+++ rasdaemon-0.4.1/ras-mce-handler.c	2020-01-10 10:03:50.554469958 -0500
@@ -334,7 +334,7 @@ #if 0
 	if (e->status & MCI_STATUS_ADDRV)
 		trace_seq_printf(s, ", addr= %llx", (long long)e->addr);
 
-	if (e->mcgstatus_msg)
+	if (*e->mcgstatus_msg)
 		trace_seq_printf(s, ", %s", e->mcgstatus_msg);
 	else
 		trace_seq_printf(s, ", mcgstatus= %llx",