File pacemaker-libcrmcommon-message-cannot-open-dump-file.patch of Package pacemaker

commit b30af11ddd465a299cf1bd66cc3c42a1ce741368
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Tue Apr 4 16:22:03 2017 -0500

    Log: libcrmcommon: more useful message if can't open dump file
    
    also avoids a static analysis false positive

diff --git a/lib/common/schemas.c b/lib/common/schemas.c
index f1a023802..055d1410e 100644
--- a/lib/common/schemas.c
+++ b/lib/common/schemas.c
@@ -553,7 +553,10 @@ dump_file(const char *filename)
     CRM_CHECK(filename != NULL, return);
 
     fp = fopen(filename, "r");
-    CRM_CHECK(fp != NULL, return);
+    if (fp == NULL) {
+        crm_perror(LOG_ERR, "Could not open %s for reading", filename);
+        return;
+    }
 
     fprintf(stderr, "%4d ", ++line);
     do {
openSUSE Build Service is sponsored by