Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: src/platform/vboot_reference/misclibs/file_keys.c

Issue 2353001: random cleanup (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform/vboot_reference/utility/firmware_utility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/misclibs/file_keys.c
diff --git a/src/platform/vboot_reference/misclibs/file_keys.c b/src/platform/vboot_reference/misclibs/file_keys.c
index 4963bf4182e23c47209a07c89a156759b657896b..00b8d1345c17efd600fc6d08fb0773c7ac2bc4b3 100644
--- a/src/platform/vboot_reference/misclibs/file_keys.c
+++ b/src/platform/vboot_reference/misclibs/file_keys.c
@@ -30,14 +30,16 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len) {
}
if (-1 == fstat(fd, &stat_fd)) {
- debug("Couldn't stat file\n");
+ debug("Couldn't stat file.\n");
return NULL;
}
*len = stat_fd.st_size;
buf = (uint8_t*) Malloc(*len);
- if (!buf)
+ if (!buf) {
+ error("Couldn't allocate %ld bytes.\n", *len);
return NULL;
+ }
if (*len != read(fd, buf, *len)) {
debug("Couldn't read file into a buffer.\n");
« no previous file with comments | « no previous file | src/platform/vboot_reference/utility/firmware_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698