From: David Bauer Date: Wed, 3 Jan 2024 14:16:19 +0000 (+0200) Subject: qmi: fix dynamic array macro X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f582e0009c730403a3b2a0592619bb87b5a54898;p=project%2Fuqmi.git qmi: fix dynamic array macro The macro was using the parameter for referencing the length field, which used the same suffix as the parameter name. Rename the length parameter to correctly access the length field. Signed-off-by: David Bauer --- diff --git a/common/qmi-message.h b/common/qmi-message.h index ed23387..a619478 100644 --- a/common/qmi-message.h +++ b/common/qmi-message.h @@ -92,8 +92,8 @@ .data._field##_n = ARRAY_SIZE(_val), \ .data._field = (_val) -#define QMI_INIT_ARRAY(_field, _val, _n) \ - .data._field##_n = (_n), \ +#define QMI_INIT_ARRAY(_field, _val, _num_elems) \ + .data._field##_n = (_num_elems), \ .data._field = (_val)