On 24.07.23 12:09, zhenwei pi wrote:
The first dimension of both to_check and
bucket_types_size/bucket_types_units is used as throttle direction,
use THROTTLE_MAX instead of hard coded number. Also use ARRAY_SIZE()
to avoid hard coded number for the second dimension.

Hanna noticed that the two array should be static. Yes, turn them
into static variables.

Signed-off-by: zhenwei pi <pizhen...@bytedance.com>
---
  util/throttle.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)

Using ARRAY_SIZE() for the other dimension is quite nice, too, indeed.  Thanks!

Reviewed-by: Hanna Czenczek <hre...@redhat.com>


Reply via email to