Blame SOURCES/0001-lib-files.c-Fix-an-issue-where-execution-could-not-r.patch

4ac4b9
From a20415d6f1d3fa09300ff1181646fe7e1785fd15 Mon Sep 17 00:00:00 2001
4ac4b9
From: Imran Desai <imran.desai@intel.com>
4ac4b9
Date: Sun, 29 Mar 2020 10:14:28 -0700
4ac4b9
Subject: [PATCH] lib/files.c: Fix an issue where execution could not reach
4ac4b9
 function return
4ac4b9
4ac4b9
Signed-off-by: Imran Desai <imran.desai@intel.com>
4ac4b9
---
4ac4b9
 lib/files.c | 8 +++-----
4ac4b9
 1 file changed, 3 insertions(+), 5 deletions(-)
4ac4b9
4ac4b9
diff --git a/lib/files.c b/lib/files.c
4ac4b9
index ef2170b079e1..501f88d11b48 100644
4ac4b9
--- a/lib/files.c
4ac4b9
+++ b/lib/files.c
4ac4b9
@@ -607,9 +607,7 @@ bool files_load_bytes_from_buffer_or_file_or_stdin(const char *input_buffer,
4ac4b9
         return true;
4ac4b9
     }
4ac4b9
 
4ac4b9
-//    printf("Reading file: %s\n", path);
4ac4b9
-//    printf("size: %u\n", *size);
4ac4b9
-
4ac4b9
+    bool retval = true;
4ac4b9
     /* Read from stdin */
4ac4b9
     if (!input_buffer && !path) {
4ac4b9
         UINT16 read_bytes = 0;
4ac4b9
@@ -640,10 +638,10 @@ bool files_load_bytes_from_buffer_or_file_or_stdin(const char *input_buffer,
4ac4b9
             return true;
4ac4b9
         }
4ac4b9
     } else if (path) {
4ac4b9
-        return files_load_bytes_from_path(path, buf, size);
4ac4b9
+        retval = files_load_bytes_from_path(path, buf, size);
4ac4b9
     }
4ac4b9
 
4ac4b9
-    return false;
4ac4b9
+    return retval;
4ac4b9
 }
4ac4b9
 
4ac4b9
 tool_rc files_save_ESYS_TR(ESYS_CONTEXT *ectx, ESYS_TR handle, const char *path) {
4ac4b9
-- 
4ac4b9
2.31.0
4ac4b9