]> git.ozlabs.org Git - petitboot/commit
lib/talloc: Fix TALLOC_ABORT
authorGeoff Levand <geoff@infradead.org>
Wed, 8 Aug 2018 20:24:50 +0000 (13:24 -0700)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 14 Aug 2018 01:10:14 +0000 (11:10 +1000)
commit7e8bc8b93ce67eda63c5a252fb051ca83979dd5b
tree1d503685746cf97fb68320ef6b3381f8806803f6
parent3b4f88057e95418bc548542b5b9a13910905c93d
lib/talloc: Fix TALLOC_ABORT

The current TALLOC_ABORT macro had a number of problems.
Failures were not going to the pb log, but only to stderr.
If the object passed in was not a talloc object the printing
of an object name would be printing random data.
The use of a macro obscured the code.

To clean this up, remove all reference to TALLOC_ABORT and
put the logging and abort calls directly into talloc_chunk_from_ptr.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
lib/talloc/talloc.c