mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
CLEANUP: freq_ctr: make arguments of freq_ctr_total() const
freq_ctr_total() doesn't modify the freq counters, it should take a const argument.
This commit is contained in:
parent
fe16126acc
commit
b4476c6a8c
@ -29,7 +29,7 @@
|
|||||||
#include <haproxy/time.h>
|
#include <haproxy/time.h>
|
||||||
|
|
||||||
/* exported functions from freq_ctr.c */
|
/* exported functions from freq_ctr.c */
|
||||||
ullong freq_ctr_total(struct freq_ctr *ctr, uint period, int pend);
|
ullong freq_ctr_total(const struct freq_ctr *ctr, uint period, int pend);
|
||||||
|
|
||||||
/* Update a frequency counter by <inc> incremental units. It is automatically
|
/* Update a frequency counter by <inc> incremental units. It is automatically
|
||||||
* rotated if the period is over. It is important that it correctly initializes
|
* rotated if the period is over. It is important that it correctly initializes
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* read_freq_ctr_period() to avoid reporting ups and downs on low-frequency
|
* read_freq_ctr_period() to avoid reporting ups and downs on low-frequency
|
||||||
* events when the past value is <= 1.
|
* events when the past value is <= 1.
|
||||||
*/
|
*/
|
||||||
ullong freq_ctr_total(struct freq_ctr *ctr, uint period, int pend)
|
ullong freq_ctr_total(const struct freq_ctr *ctr, uint period, int pend)
|
||||||
{
|
{
|
||||||
ullong curr, past;
|
ullong curr, past;
|
||||||
uint curr_tick;
|
uint curr_tick;
|
||||||
|
Loading…
Reference in New Issue
Block a user