Skip to content

Commit

Permalink
information: fix system load cast
Browse files Browse the repository at this point in the history
Cast the result of the calculation. If not, the load will always be 0.

Signed-off-by: David Bauer <mail@david-bauer.net>
  • Loading branch information
blocktrron committed Apr 18, 2024
1 parent 6f032da commit 3bd14cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/information.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int node_whisperer_information_system_load_collect(uint8_t *buffer, size_t buffe
return -1;
}

buffer[0] = (uint8_t) samples[0] * 10;
buffer[0] = (uint8_t) (samples[0] * 10);
return 1;
}

Expand Down

0 comments on commit 3bd14cc

Please sign in to comment.