0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-28 22:52:30 +00:00

Fix undefined behaviour. ()

This commit is contained in:
vkalintiris 2024-12-02 20:40:19 +02:00 committed by GitHub
parent a2b9731d28
commit bf8aa93337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}
/**