diff options
author | Chris Kay <chris.kay@arm.com> | 2020-06-08 17:51:56 +0100 |
---|---|---|
committer | jimqui01 <54316584+jimqui01@users.noreply.github.com> | 2020-06-09 19:26:33 +0100 |
commit | 6094316869ea7549559acb738a73dc284313379c (patch) | |
tree | 17933bf838dc7d7cbd4e8151542d1b6c24f97a15 /module/psu/src | |
parent | 995e78d8ed0563018379418caa45c0a64ece7acb (diff) |
fwk: Rework assertion logic
This commit modifies the assertion logic so that it is inlineable, and
uses more of the facilities provided by the compiler and standard
library for more robust error handling.
Change-Id: I3064b96eccf183b704aba0c319c94c43131ab25b
Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'module/psu/src')
-rw-r--r-- | module/psu/src/mod_psu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/psu/src/mod_psu.c b/module/psu/src/mod_psu.c index be521201..935a1faa 100644 --- a/module/psu/src/mod_psu.c +++ b/module/psu/src/mod_psu.c @@ -275,7 +275,7 @@ static int mod_psu_init( unsigned int element_count, const void *data) { - fwk_expect(data == NULL); + fwk_check(data == NULL); mod_psu_ctx.elements = fwk_mm_calloc(element_count, sizeof(mod_psu_ctx.elements[0])); @@ -290,7 +290,7 @@ static int mod_psu_element_init( { struct mod_psu_element_ctx *ctx; - fwk_expect(sub_element_count == 0); + fwk_check(sub_element_count == 0); ctx = mod_psu_get_element_ctx(element_id); |