From 7ea425db5ef6949100a7890ca76f9df5730001fd Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 30 Sep 2022 09:33:56 +0000 Subject: [PATCH] pvattest/exchange_format.c: use proper endianess conversion macro for `hdr->version` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GUINT32_TO_BE and GUINT32_FROM_BE do exactly the same in case of glib2, just the naming differs. However, at this point the conversion is from be to system endianness therefore `GUINT32_FROM_BE` is the proper macro. Signed-off-by: Marc Hartmayer Reviewed-by: Steffen Eiden Signed-off-by: Jan Höppner --- pvattest/src/exchange_format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvattest/src/exchange_format.c b/pvattest/src/exchange_format.c index c622e656..de59133b 100644 --- a/pvattest/src/exchange_format.c +++ b/pvattest/src/exchange_format.c @@ -191,7 +191,7 @@ exchange_format_ctx_t *exchange_ctx_from_file(const char *filename, GError **err } ctx->req_meas_size = GUINT32_FROM_BE(hdr_v1->measurement.size); ctx->req_add_size = GUINT32_FROM_BE(hdr_v1->additional_data.size); - ctx->version = GUINT32_TO_BE(hdr->version); + ctx->version = GUINT32_FROM_BE(hdr->version); return g_steal_pointer(&ctx); }