summaryrefslogtreecommitdiff
path: root/util/cbfstool/elfparsing.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-08-05 12:04:55 -0700
committerPatrick Georgi <pgeorgi@google.com>2016-08-08 13:01:34 +0200
commitb927bec09a09d96e44247b16fb1171efe6744f65 (patch)
treecde7209eb6b957a0d208383095a05e296e572c2d /util/cbfstool/elfparsing.h
parentf3bba44a04a966198ed0896f3b516e1d5909769b (diff)
downloadcoreboot-b927bec09a09d96e44247b16fb1171efe6744f65.tar.xz
cbfstool/elfheaders: Make elf_writer_destroy NULL-safe
This relieves caller from having to check if the parameter being passed in is NULL. Change-Id: I3ea935c12d46c6fb5534e0f2077232b9e25240f1 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/16076 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/cbfstool/elfparsing.h')
-rw-r--r--util/cbfstool/elfparsing.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cbfstool/elfparsing.h b/util/cbfstool/elfparsing.h
index 4b9ba8d434..978592bc46 100644
--- a/util/cbfstool/elfparsing.h
+++ b/util/cbfstool/elfparsing.h
@@ -93,6 +93,8 @@ struct elf_writer *elf_writer_init(const Elf64_Ehdr *ehdr);
/*
* Clean up any internal state represented by ew. Aftewards the elf_writer
* is invalid.
+ * It is safe to call elf_writer_destroy with ew as NULL. It returns without
+ * performing any action.
*/
void elf_writer_destroy(struct elf_writer *ew);