From 646d5df49e1806b8c6322854ddb21903d906f471 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 22 Mar 2023 12:43:25 +0100 Subject: journal-vacuum: rename function to match struct name --- src/libsystemd/sd-journal/journal-vacuum.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsystemd/sd-journal/journal-vacuum.c b/src/libsystemd/sd-journal/journal-vacuum.c index 7395d00bd4..8eaeb675fe 100644 --- a/src/libsystemd/sd-journal/journal-vacuum.c +++ b/src/libsystemd/sd-journal/journal-vacuum.c @@ -20,7 +20,7 @@ #include "time-util.h" #include "xattr-util.h" -struct vacuum_info { +typedef struct vacuum_info { uint64_t usage; char *filename; @@ -29,9 +29,9 @@ struct vacuum_info { sd_id128_t seqnum_id; uint64_t seqnum; bool have_seqnum; -}; +} vacuum_info; -static int vacuum_compare(const struct vacuum_info *a, const struct vacuum_info *b) { +static int vacuum_info_compare(const vacuum_info *a, const vacuum_info *b) { int r; if (a->have_seqnum && b->have_seqnum && @@ -126,7 +126,7 @@ int journal_directory_vacuum( uint64_t sum = 0, freed = 0, n_active_files = 0; size_t n_list = 0, i; _cleanup_closedir_ DIR *d = NULL; - struct vacuum_info *list = NULL; + vacuum_info *list = NULL; usec_t retention_limit = 0; int r; @@ -273,7 +273,7 @@ int journal_directory_vacuum( goto finish; } - list[n_list++] = (struct vacuum_info) { + list[n_list++] = (vacuum_info) { .filename = TAKE_PTR(p), .usage = size, .seqnum = seqnum, @@ -285,7 +285,7 @@ int journal_directory_vacuum( sum += size; } - typesafe_qsort(list, n_list, vacuum_compare); + typesafe_qsort(list, n_list, vacuum_info_compare); for (i = 0; i < n_list; i++) { uint64_t left; -- cgit v1.2.1