mirror of
https://github.com/netdata/netdata.git
synced 2025-04-28 22:52:30 +00:00
Fix undefined behaviour. (#19116)
This commit is contained in:
parent
a2b9731d28
commit
bf8aa93337
1 changed files with 5 additions and 9 deletions
|
@ -1652,15 +1652,11 @@ int ebpf_disable_tracing_values(char *subsys, char *eventname)
|
|||
*/
|
||||
static uint32_t ebpf_select_pc_prefix()
|
||||
{
|
||||
long counter = 1;
|
||||
uint32_t i;
|
||||
for (i = 0; i < 128; i++) {
|
||||
counter <<= 1;
|
||||
if (counter < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return counter;
|
||||
#if SIZE_OF_VOID_P == 4
|
||||
return 32;
|
||||
#else
|
||||
return 64;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue