summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/catalog.c4
-rw-r--r--src/journal/coredump.c2
-rw-r--r--src/journal/coredumpctl.c10
-rw-r--r--src/journal/journal-gatewayd.c2
-rw-r--r--src/journal/journalctl.c6
-rw-r--r--src/journal/journald-server.c16
-rw-r--r--src/journal/microhttpd-util.c2
-rw-r--r--src/journal/sd-journal.c8
-rw-r--r--src/journal/test-catalog.c2
-rw-r--r--src/journal/test-journal-enum.c2
-rw-r--r--src/journal/test-journal-match.c4
-rw-r--r--src/journal/test-journal-stream.c6
-rw-r--r--src/journal/test-journal-syslog.c2
13 files changed, 33 insertions, 33 deletions
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
index 7681af6629..7738d243a5 100644
--- a/src/journal/catalog.c
+++ b/src/journal/catalog.c
@@ -277,7 +277,7 @@ static long write_catalog(const char *database, Hashmap *h, struct strbuf *sb,
CatalogHeader header;
_cleanup_fclose_ FILE *w = NULL;
int r;
- char _cleanup_free_ *d, *p = NULL;
+ _cleanup_free_ char *d, *p = NULL;
size_t k;
d = dirname_malloc(database);
@@ -627,7 +627,7 @@ int catalog_list_items(FILE *f, const char *database, bool oneline, char **items
STRV_FOREACH(item, items) {
sd_id128_t id;
int k;
- char _cleanup_free_ *msg = NULL;
+ _cleanup_free_ char *msg = NULL;
k = sd_id128_from_string(*item, &id);
if (k < 0) {
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 2dfb04afdf..2be6d94c22 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -103,7 +103,7 @@ int main(int argc, char* argv[]) {
uid_t uid;
gid_t gid;
struct iovec iovec[14];
- char _cleanup_free_ *core_pid = NULL, *core_uid = NULL, *core_gid = NULL, *core_signal = NULL,
+ _cleanup_free_ char *core_pid = NULL, *core_uid = NULL, *core_gid = NULL, *core_signal = NULL,
*core_timestamp = NULL, *core_comm = NULL, *core_exe = NULL, *core_unit = NULL,
*core_session = NULL, *core_message = NULL, *core_cmdline = NULL, *p = NULL;
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 97d967db3c..0bbfff2ecd 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -104,7 +104,7 @@ static int add_match(Set *set, const char *match) {
unsigned pid;
const char* prefix;
char *pattern = NULL;
- char _cleanup_free_ *p = NULL;
+ _cleanup_free_ char *p = NULL;
if (strchr(match, '='))
prefix = "";
@@ -269,7 +269,7 @@ static int retrieve(const void *data,
}
static void print_field(FILE* file, sd_journal *j) {
- const char _cleanup_free_ *value = NULL;
+ _cleanup_free_ const char *value = NULL;
const void *d;
size_t l;
@@ -282,7 +282,7 @@ static void print_field(FILE* file, sd_journal *j) {
}
static int print_entry(FILE* file, sd_journal *j, int had_legend) {
- const char _cleanup_free_
+ _cleanup_free_ const char
*pid = NULL, *uid = NULL, *gid = NULL,
*sgnl = NULL, *exe = NULL;
const void *d;
@@ -520,11 +520,11 @@ finish:
}
int main(int argc, char *argv[]) {
- sd_journal _cleanup_journal_close_ *j = NULL;
+ _cleanup_journal_close_ sd_journal*j = NULL;
const char* match;
Iterator it;
int r = 0;
- Set _cleanup_set_free_free_ *matches = NULL;
+ _cleanup_set_free_free_ Set *matches = NULL;
setlocale(LC_ALL, "");
log_parse_environment();
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
index a633638f80..51a938b79e 100644
--- a/src/journal/journal-gatewayd.c
+++ b/src/journal/journal-gatewayd.c
@@ -335,7 +335,7 @@ static int request_parse_range(
colon2 = strchr(colon + 1, ':');
if (colon2) {
- char _cleanup_free_ *t;
+ _cleanup_free_ char *t;
t = strndup(colon + 1, colon2 - colon - 1);
if (!t)
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 68be369f30..d1b201beba 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -544,7 +544,7 @@ static int add_matches(sd_journal *j, char **args) {
if (streq(*i, "+"))
r = sd_journal_add_disjunction(j);
else if (path_is_absolute(*i)) {
- char _cleanup_free_ *p, *t = NULL;
+ _cleanup_free_ char *p, *t = NULL;
const char *path;
struct stat st;
@@ -1028,7 +1028,7 @@ static int access_check(sd_journal *j) {
int main(int argc, char *argv[]) {
int r;
- sd_journal _cleanup_journal_close_ *j = NULL;
+ _cleanup_journal_close_ sd_journal*j = NULL;
bool need_seek = false;
sd_id128_t previous_boot_id;
bool previous_boot_id_valid = false, first_line = true;
@@ -1059,7 +1059,7 @@ int main(int argc, char *argv[]) {
arg_action == ACTION_DUMP_CATALOG) {
const char* database = CATALOG_DATABASE;
- char _cleanup_free_ *copy = NULL;
+ _cleanup_free_ char *copy = NULL;
if (arg_root) {
copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL);
if (!copy) {
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index ef6189e22d..7e7b379df8 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -95,13 +95,13 @@ DEFINE_CONFIG_PARSE_ENUM(config_parse_split_mode, split_mode, SplitMode, "Failed
static uint64_t available_space(Server *s) {
char ids[33];
- char _cleanup_free_ *p = NULL;
+ _cleanup_free_ char *p = NULL;
const char *f;
sd_id128_t machine;
struct statvfs ss;
uint64_t sum = 0, avail = 0, ss_avail = 0;
int r;
- DIR _cleanup_closedir_ *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
usec_t ts;
JournalMetrics *m;
@@ -512,12 +512,12 @@ static void dispatch_message_real(
boot_id[sizeof("_BOOT_ID=") + 32] = "_BOOT_ID=",
machine_id[sizeof("_MACHINE_ID=") + 32] = "_MACHINE_ID=";
- char _cleanup_free_ *comm = NULL, *cmdline = NULL, *hostname = NULL,
+ _cleanup_free_ char *comm = NULL, *cmdline = NULL, *hostname = NULL,
*exe = NULL, *cgroup = NULL, *session = NULL,
*owner_uid = NULL, *unit = NULL, *selinux_context = NULL;
#ifdef HAVE_AUDIT
- char _cleanup_free_ *audit_session = NULL, *audit_loginuid = NULL;
+ _cleanup_free_ char *audit_session = NULL, *audit_loginuid = NULL;
#endif
sd_id128_t id;
@@ -745,7 +745,7 @@ void server_dispatch_message(
int priority) {
int rl, r;
- char _cleanup_free_ *path = NULL;
+ _cleanup_free_ char *path = NULL;
char *c;
assert(s);
@@ -1247,7 +1247,7 @@ static int open_signalfd(Server *s) {
}
static int server_parse_proc_cmdline(Server *s) {
- char _cleanup_free_ *line = NULL;
+ _cleanup_free_ char *line = NULL;
char *w, *state;
int r;
size_t l;
@@ -1262,7 +1262,7 @@ static int server_parse_proc_cmdline(Server *s) {
}
FOREACH_WORD_QUOTED(w, l, line, state) {
- char _cleanup_free_ *word;
+ _cleanup_free_ char *word;
word = strndup(w, l);
if (!word)
@@ -1295,7 +1295,7 @@ static int server_parse_proc_cmdline(Server *s) {
static int server_parse_config_file(Server *s) {
static const char *fn = "/etc/systemd/journald.conf";
- FILE _cleanup_fclose_ *f = NULL;
+ _cleanup_fclose_ FILE *f = NULL;
int r;
assert(s);
diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c
index dc91b81bde..382087c790 100644
--- a/src/journal/microhttpd-util.c
+++ b/src/journal/microhttpd-util.c
@@ -28,7 +28,7 @@
#include "util.h"
void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
- char _cleanup_free_ *f;
+ _cleanup_free_ char *f;
if (asprintf(&f, "microhttpd: %s", fmt) <= 0) {
log_oom();
return;
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index bc9e41e047..064929bf18 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1256,7 +1256,7 @@ static void check_network(sd_journal *j, int fd) {
}
static int add_file(sd_journal *j, const char *prefix, const char *filename) {
- char _cleanup_free_ *path = NULL;
+ _cleanup_free_ char *path = NULL;
int r;
JournalFile *f;
@@ -1347,9 +1347,9 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename)
}
static int add_directory(sd_journal *j, const char *prefix, const char *dirname) {
- char _cleanup_free_ *path = NULL;
+ _cleanup_free_ char *path = NULL;
int r;
- DIR _cleanup_closedir_ *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
sd_id128_t id, mid;
Directory *m;
@@ -1437,7 +1437,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname)
}
static int add_root_directory(sd_journal *j, const char *p) {
- DIR _cleanup_closedir_ *d = NULL;
+ _cleanup_closedir_ DIR *d = NULL;
Directory *m;
int r;
diff --git a/src/journal/test-catalog.c b/src/journal/test-catalog.c
index c463035891..987867f0c8 100644
--- a/src/journal/test-catalog.c
+++ b/src/journal/test-catalog.c
@@ -35,7 +35,7 @@ static void test_import(Hashmap *h, struct strbuf *sb,
const char* contents, ssize_t size, int code) {
int r;
char name[] = "/tmp/test-catalog.XXXXXX";
- int _cleanup_close_ fd = mkstemp(name);
+ _cleanup_close_ int fd = mkstemp(name);
assert(fd >= 0);
assert_se(write(fd, contents, size) == size);
diff --git a/src/journal/test-journal-enum.c b/src/journal/test-journal-enum.c
index bd1f5199e5..980244e016 100644
--- a/src/journal/test-journal-enum.c
+++ b/src/journal/test-journal-enum.c
@@ -29,7 +29,7 @@
int main(int argc, char *argv[]) {
unsigned n = 0;
- sd_journal _cleanup_journal_close_ *j = NULL;
+ _cleanup_journal_close_ sd_journal*j = NULL;
log_set_max_level(LOG_DEBUG);
diff --git a/src/journal/test-journal-match.c b/src/journal/test-journal-match.c
index 7b14568fd2..37bffc1883 100644
--- a/src/journal/test-journal-match.c
+++ b/src/journal/test-journal-match.c
@@ -28,8 +28,8 @@
#include "log.h"
int main(int argc, char *argv[]) {
- sd_journal _cleanup_journal_close_ *j;
- char _cleanup_free_ *t;
+ _cleanup_journal_close_ sd_journal*j;
+ _cleanup_free_ char *t;
log_set_max_level(LOG_DEBUG);
diff --git a/src/journal/test-journal-stream.c b/src/journal/test-journal-stream.c
index 4b73ac7906..4aba7febc7 100644
--- a/src/journal/test-journal-stream.c
+++ b/src/journal/test-journal-stream.c
@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) {
JournalFile *one, *two, *three;
char t[] = "/tmp/journal-stream-XXXXXX";
unsigned i;
- sd_journal _cleanup_journal_close_ *j = NULL;
+ _cleanup_journal_close_ sd_journal*j = NULL;
char *z;
const void *data;
size_t l;
@@ -126,7 +126,7 @@ int main(int argc, char *argv[]) {
assert_se(sd_journal_add_match(j, "MAGIC=quux", 0) >= 0);
SD_JOURNAL_FOREACH_BACKWARDS(j) {
- char _cleanup_free_ *c;
+ _cleanup_free_ char *c;
assert_se(sd_journal_get_data(j, "NUMBER", &data, &l) >= 0);
printf("\t%.*s\n", (int) l, (const char*) data);
@@ -136,7 +136,7 @@ int main(int argc, char *argv[]) {
}
SD_JOURNAL_FOREACH(j) {
- char _cleanup_free_ *c;
+ _cleanup_free_ char *c;
assert_se(sd_journal_get_data(j, "NUMBER", &data, &l) >= 0);
printf("\t%.*s\n", (int) l, (const char*) data);
diff --git a/src/journal/test-journal-syslog.c b/src/journal/test-journal-syslog.c
index 895975caa5..b9419372ad 100644
--- a/src/journal/test-journal-syslog.c
+++ b/src/journal/test-journal-syslog.c
@@ -25,7 +25,7 @@
static void test_syslog_parse_identifier(const char* str,
const char *ident, const char*pid, int ret) {
const char *buf = str;
- char _cleanup_free_ *ident2 = NULL, *pid2 = NULL;
+ _cleanup_free_ char *ident2 = NULL, *pid2 = NULL;
int ret2;
ret2 = syslog_parse_identifier(&buf, &ident2, &pid2);