Skip to content

Commit 63cc0e9

Browse files
committed
Declare read-only function parameters const
1 parent e4fee13 commit 63cc0e9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/share/ratelimit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static inline void ratelimit_reset(RateLimit *rl) {
1818
rl->num = rl->begin = 0;
1919
}
2020

21-
static inline bool ratelimit_configured(RateLimit *rl) {
21+
static inline bool ratelimit_configured(const RateLimit *rl) {
2222
return rl->interval > 0 && rl->burst > 0;
2323
}
2424

src/share/stat-util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int is_dir(const char* path, bool follow) {
3232
return !!S_ISDIR(st.st_mode);
3333
}
3434

35-
bool null_or_empty(struct stat *st) {
35+
bool null_or_empty(const struct stat *st) {
3636
assert(st);
3737

3838
if (S_ISREG(st->st_mode) && st->st_size <= 0)

src/share/stat-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
int is_dir(const char *path, bool follow);
1414

15-
bool null_or_empty(struct stat *st) _pure_;
15+
bool null_or_empty(const struct stat *st) _pure_;
1616

1717
int files_same(const char *filea, const char *fileb);
1818

0 commit comments

Comments
 (0)