aboutsummaryrefslogtreecommitdiffstats
path: root/ringbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'ringbuffer.c')
-rw-r--r--ringbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 94efe0b5c7..ca94655438 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -113,7 +113,7 @@ static int ringbuf_open_file(rb_file *rfile, int *err)
#endif
current_time = time(NULL);
- g_snprintf(filenum, sizeof(filenum), "%05u", (rb_data.curr_file_num + 1) % 100000);
+ g_snprintf(filenum, sizeof(filenum), "%05u", (rb_data.curr_file_num + 1) % RINGBUFFER_MAX_NUM_FILES);
strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", localtime(&current_time));
rfile->name = g_strconcat(rb_data.fprefix, "_", filenum, "_", timestr,
rb_data.fsuffix, NULL);