From 881e556e0699c924c75c3e8d2c62559becc9c04b Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 24 Mar 2023 19:25:35 +0100 Subject: [PATCH] Fix pcf_sdd_value() return check --- src/emu/nanos6/breakdown.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/emu/nanos6/breakdown.c b/src/emu/nanos6/breakdown.c index a692395..9dfac00 100644 --- a/src/emu/nanos6/breakdown.c +++ b/src/emu/nanos6/breakdown.c @@ -249,16 +249,16 @@ model_nanos6_breakdown_finish(struct emu *emu, /* Emit subsystem values */ for (v = labels[CH_SUBSYSTEM]; v->label; v++) { - if (pcf_add_value(pcftype, v->value, v->label) != 0) { - err("pcf_add_value failed"); + if (pcf_add_value(pcftype, v->value, v->label) == NULL) { + err("pcf_add_value ss failed"); return -1; } } /* Emit idle values */ for (v = labels[CH_IDLE]; v->label; v++) { - if (pcf_add_value(pcftype, v->value, v->label) != 0) { - err("pcf_add_value failed"); + if (pcf_add_value(pcftype, v->value, v->label) == NULL) { + err("pcf_add_value idle failed"); return -1; } }