From d3d3208f607693b8fde5226efa0cc15ec17670a0 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 12 Dec 2014 18:06:22 +0100 Subject: [PATCH 1/1] journal: move type_to_context() to journal-file.c It has no other callers. It does not need to be in the header file. --- src/journal/journal-file.c | 5 +++++ src/journal/journal-file.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index f70699010..4632326d4 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -374,6 +374,11 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) return 0; } +static unsigned type_to_context(int type) { + /* One context for each type, plus one catch-all for the rest */ + return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; +} + static int journal_file_move_to(JournalFile *f, int context, bool keep_always, uint64_t offset, uint64_t size, void **ret) { assert(f); assert(ret); diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index c5a92bc5f..5e8065c5a 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -205,9 +205,3 @@ int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, usec_t * int journal_file_get_cutoff_monotonic_usec(JournalFile *f, sd_id128_t boot, usec_t *from, usec_t *to); bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec); - - -static unsigned type_to_context(int type) { - /* One context for each type, plus one catch-all for the rest */ - return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; -} -- 2.30.2