Skip to content

Commit 65d3155

Browse files
committed
util/xdp_sample: Change interval parameter of sample_run() to unsigned
The interval is implied to be unsigned, but the variable is a regular int; change it to unsigned int to better reflect the semantics. Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
1 parent c2c54e9 commit 65d3155

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/util/xdp_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ static int sample_timer_cb(int timerfd, struct stats_record **rec,
15421542
return print_stats(rec, prev);
15431543
}
15441544

1545-
int sample_run(int interval, void (*post_cb)(void *), void *ctx)
1545+
int sample_run(unsigned int interval, void (*post_cb)(void *), void *ctx)
15461546
{
15471547
struct timespec ts = { interval, 0 };
15481548
struct itimerspec its = { ts, ts };

lib/util/xdp_sample.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ enum sample_compat {
4242
int sample_setup_maps(struct bpf_map **maps, const char *ifname);
4343
int __sample_init(int mask, int ifindex_from, int ifindex_to);
4444
void sample_teardown(void);
45-
int sample_run(int interval, void (*post_cb)(void *), void *ctx);
45+
int sample_run(unsigned int interval, void (*post_cb)(void *), void *ctx);
4646
bool sample_is_compat(enum sample_compat compat_value);
4747
bool sample_probe_cpumap_compat(void);
4848
bool sample_probe_xdp_load_bytes(void);

0 commit comments

Comments
 (0)