mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
capture-reader: fix byte swap of frame info
If we are swapping between endianness, we were miss swapping various fields and they'd all end up with the swapped len value.
This commit is contained in:
@ -176,9 +176,9 @@ sp_capture_reader_bswap_frame (SpCaptureReader *self,
|
||||
if (G_UNLIKELY (self->endian != G_BYTE_ORDER))
|
||||
{
|
||||
frame->len = GUINT16_SWAP_LE_BE (frame->len);
|
||||
frame->cpu = GUINT16_SWAP_LE_BE (frame->len);
|
||||
frame->pid = GUINT32_SWAP_LE_BE (frame->len);
|
||||
frame->time = GUINT64_SWAP_LE_BE (frame->len);
|
||||
frame->cpu = GUINT16_SWAP_LE_BE (frame->cpu);
|
||||
frame->pid = GUINT32_SWAP_LE_BE (frame->pid);
|
||||
frame->time = GUINT64_SWAP_LE_BE (frame->time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user