pvattest/exchange_format.c: use proper endianess conversion macro for hdr->version

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 <mhartmay@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2022-09-30 09:33:56 +00:00
committed by Jan Höppner
parent 330ddb7adb
commit 7ea425db5e

View File

@@ -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);
}