From b7c27fc7180dee50781d0df572e02c17c7173cc9 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 16 Jul 2024 14:32:40 +0000 Subject: [PATCH] Fix crash in debug logging --- bbfdmd/ubus/bbfdmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bbfdmd/ubus/bbfdmd.c b/bbfdmd/ubus/bbfdmd.c index 732e9918..bf4ee306 100644 --- a/bbfdmd/ubus/bbfdmd.c +++ b/bbfdmd/ubus/bbfdmd.c @@ -145,10 +145,8 @@ static void fill_optional_data(bbfdm_data_t *data, struct blob_attr *msg) data->is_raw = is_str_eq(blobmsg_get_string(attr), "raw") ? true : false; } - DEBUG("Proto:|%s|, Inst Mode:|%s|, Tran-id:|%d|, Format:|%s|", - (data->bbf_ctx.dm_type == BBFDM_BOTH) ? "both" : (data->bbf_ctx.dm_type == BBFDM_CWMP) ? "cwmp" : "usp", - data->trans_id, - data->is_raw ? "raw" : "pretty"); + char *proto = (data->bbf_ctx.dm_type == BBFDM_BOTH) ? "both" : (data->bbf_ctx.dm_type == BBFDM_CWMP) ? "cwmp" : "usp"; + DEBUG("Proto:|%s|, Tran-id:|%d|, is_raw:|%d|", proto, data->trans_id, data->is_raw); } static void async_req_free(struct bbfdm_async_req *r)