Skip to content

Commit

Permalink
fix misalignment
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo committed Sep 21, 2024
1 parent b8c44a1 commit 9647d31
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/libsinsp_e2e/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,7 @@ TEST_F(sys_call_test, procinfo_two_processchilds_cpuload) {
if(tinfo->m_tid == ctid) {
uint64_t tcpu;

const sinsp_evt_param* parinfo = e->get_param(0);
tcpu = *(uint64_t*)parinfo->m_val;
memcpy(&tcpu, e->get_param(0)->m_val, sizeof(uint64_t));

uint64_t delta = tcpu - lastcpu;

Expand All @@ -828,8 +827,7 @@ TEST_F(sys_call_test, procinfo_two_processchilds_cpuload) {
} else if(tinfo->m_tid == ctid1) {
uint64_t tcpu;

const sinsp_evt_param* parinfo = e->get_param(0);
tcpu = *(uint64_t*)parinfo->m_val;
memcpy(&tcpu, e->get_param(0)->m_val, sizeof(uint64_t));

uint64_t delta = tcpu - lastcpu1;

Expand Down

0 comments on commit 9647d31

Please sign in to comment.