mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Constify some rrd_*() functions
These don't modify the db, so just constify them while we're in the area. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chris Longros <[email protected]> Signed-off-by: Kyle Evans <[email protected]> Closes #18645
This commit is contained in:
1 parent
41311c6651
commit
21fb3939f9
2 files changed
+6
-6
No files matched your search
+3
-3
@@ -60,12 +60,12 @@ typedef struct {
|
||||
rrd_t dbr_months;
|
||||
} dbrrd_t;
|
||||
|
||||
size_t rrd_len(rrd_t *rrd);
|
||||
size_t rrd_len(const rrd_t *rrd);
|
||||
|
||||
const rrd_data_t *rrd_entry(rrd_t *r, size_t i);
|
||||
const rrd_data_t *rrd_entry(const rrd_t *r, size_t i);
|
||||
rrd_data_t *rrd_tail_entry(rrd_t *rrd);
|
||||
uint64_t rrd_tail(rrd_t *rrd);
|
||||
uint64_t rrd_get(rrd_t *rrd, size_t i);
|
||||
uint64_t rrd_get(const rrd_t *rrd, size_t i);
|
||||
|
||||
void rrd_add(rrd_t *rrd, hrtime_t time, uint64_t txg);
|
||||
|
||||
|
||||
@@ -99,14 +99,14 @@ rrd_tail(rrd_t *rrd)
|
||||
* rrd_get works from 0..rrd_len()-1.
|
||||
*/
|
||||
size_t
|
||||
rrd_len(rrd_t *rrd)
|
||||
rrd_len(const rrd_t *rrd)
|
||||
{
|
||||
|
||||
return (rrd->rrd_length);
|
||||
}
|
||||
|
||||
const rrd_data_t *
|
||||
rrd_entry(rrd_t *rrd, size_t i)
|
||||
rrd_entry(const rrd_t *rrd, size_t i)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
@@ -119,7 +119,7 @@ rrd_entry(rrd_t *rrd, size_t i)
|
||||
}
|
||||
|
||||
uint64_t
|
||||
rrd_get(rrd_t *rrd, size_t i)
|
||||
rrd_get(const rrd_t *rrd, size_t i)
|
||||
{
|
||||
const rrd_data_t *data = rrd_entry(rrd, i);
|
||||
|
||||
|
||||
Reference in new issue
Block a user