Skip to content

Commit

Permalink
chore(userspace/libscap): fix a print and a comment.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>

Co-authored-by: Andrea Terzolo <[email protected]>
  • Loading branch information
2 people authored and poiana committed Nov 22, 2022
1 parent dddde68 commit 50340f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userspace/libscap/engine/bpf/scap_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ int32_t scap_bpf_load(

if(online_cpu != handle->m_dev_set.m_ndevs)
{
snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "processors online: %d, expected: %d", j, handle->m_dev_set.m_ndevs);
snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "processors online: %d, expected: %d", online_cpu, handle->m_dev_set.m_ndevs);
return SCAP_FAILURE;
}

Expand Down Expand Up @@ -1737,7 +1737,7 @@ static int32_t init(scap_t* handle, scap_open_args *oargs)
}

//
// Find out how many devices we have to open, which equals to the number of CPUs
// Find out how many devices we have to open, which equals to the number of online CPUs
//
ssize_t num_cpus = sysconf(_SC_NPROCESSORS_CONF);
if(num_cpus == -1)
Expand Down

0 comments on commit 50340f0

Please sign in to comment.