From: Yu Watanabe Date: Sun, 26 Jan 2025 23:59:05 +0000 (+0900) Subject: journal-remote: coding style fixlets X-Git-Tag: v258-rc1~1476 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=146ec85ef52600cec7385e29a04348d61a743a2e;p=thirdparty%2Fsystemd.git journal-remote: coding style fixlets Co-authored-by: Andrii Chubatiuk --- diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c index 73b22170e79..646253e1a5e 100644 --- a/src/journal-remote/journal-gatewayd.c +++ b/src/journal-remote/journal-gatewayd.c @@ -816,7 +816,7 @@ static int request_handler_machine( _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; RequestMeta *m = ASSERT_PTR(connection_cls); int r; - _cleanup_free_ char* hostname = NULL, *pretty_name = NULL, *os_name = NULL; + _cleanup_free_ char *hostname = NULL, *pretty_name = NULL, *os_name = NULL; uint64_t cutoff_from = 0, cutoff_to = 0, usage = 0; sd_id128_t mid, bid; _cleanup_free_ char *v = NULL, *json = NULL; diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 7156bc7727e..c48b7df2014 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -32,16 +32,16 @@ #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" #define TRUST_FILE CERTIFICATE_ROOT "/ca/trusted.pem" -static const char* arg_url = NULL; -static const char* arg_getter = NULL; -static const char* arg_listen_raw = NULL; -static const char* arg_listen_http = NULL; -static const char* arg_listen_https = NULL; -static char** arg_files = NULL; /* Do not free this. */ +static const char *arg_url = NULL; +static const char *arg_getter = NULL; +static const char *arg_listen_raw = NULL; +static const char *arg_listen_http = NULL; +static const char *arg_listen_https = NULL; +static char **arg_files = NULL; /* Do not free this. */ static bool arg_compress = true; static bool arg_seal = false; static int http_socket = -1, https_socket = -1; -static char** arg_gnutls_log = NULL; +static char **arg_gnutls_log = NULL; static JournalWriteSplitMode arg_split_mode = _JOURNAL_WRITE_SPLIT_INVALID; static char *arg_output = NULL; @@ -78,7 +78,7 @@ static DEFINE_CONFIG_PARSE_ENUM(config_parse_write_split_mode, journal_write_spl ********************************************************************** **********************************************************************/ -static int spawn_child(const char* child, char** argv) { +static int spawn_child(const char *child, char **argv) { pid_t child_pid; int fd[2], r; @@ -110,7 +110,7 @@ static int spawn_child(const char* child, char** argv) { return fd[0]; } -static int spawn_curl(const char* url) { +static int spawn_curl(const char *url) { char **argv = STRV_MAKE("curl", "-HAccept: application/vnd.fdo.journal", "--silent", @@ -544,9 +544,9 @@ static int setup_raw_socket(RemoteServer *s, const char *address) { static int create_remoteserver( RemoteServer *s, - const char* key, - const char* cert, - const char* trust) { + const char *key, + const char *cert, + const char *trust) { int r, n, fd; @@ -937,7 +937,7 @@ static int parse_argv(int argc, char *argv[]) { case ARG_GNUTLS_LOG: #if HAVE_GNUTLS - for (const char* p = optarg;;) { + for (const char *p = optarg;;) { _cleanup_free_ char *word = NULL; r = extract_first_word(&p, &word, ",", 0); diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 92187b7420c..c92651b409b 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -44,7 +44,7 @@ MHDDaemonWrapper *MHDDaemonWrapper_free(MHDDaemonWrapper *d) { } #endif -static int open_output(RemoteServer *s, Writer *w, const char* host) { +static int open_output(RemoteServer *s, Writer *w, const char *host) { _cleanup_free_ char *_filename = NULL; const char *filename; int r; @@ -233,7 +233,7 @@ static int remove_source(RemoteServer *s, int fd) { return 0; } -int journal_remote_add_source(RemoteServer *s, int fd, char* name, bool own_name) { +int journal_remote_add_source(RemoteServer *s, int fd, char *name, bool own_name) { RemoteSource *source = NULL; int r; @@ -492,7 +492,7 @@ static int dispatch_blocking_source_event(sd_event_source *event, } static int accept_connection( - const char* type, + const char *type, int fd, SocketAddress *addr, char **hostname) { diff --git a/src/journal-remote/journal-remote.h b/src/journal-remote/journal-remote.h index f1ec5d9a543..5c1d4863b90 100644 --- a/src/journal-remote/journal-remote.h +++ b/src/journal-remote/journal-remote.h @@ -59,7 +59,7 @@ int journal_remote_server_init( int journal_remote_get_writer(RemoteServer *s, const char *host, Writer **writer); -int journal_remote_add_source(RemoteServer *s, int fd, char* name, bool own_name); +int journal_remote_add_source(RemoteServer *s, int fd, char *name, bool own_name); int journal_remote_add_raw_socket(RemoteServer *s, int fd); int journal_remote_handle_raw_source( sd_event_source *event, diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index eb36d03130c..c702b00806e 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -42,7 +42,7 @@ #define TRUST_FILE CERTIFICATE_ROOT "/ca/trusted.pem" #define DEFAULT_PORT 19532 -static const char* arg_url = NULL; +static const char *arg_url = NULL; static const char *arg_key = NULL; static const char *arg_cert = NULL; static const char *arg_trust = NULL; diff --git a/src/journal-remote/journal-upload.h b/src/journal-remote/journal-upload.h index 5ba3c4f1a0e..fe6abb75a9e 100644 --- a/src/journal-remote/journal-upload.h +++ b/src/journal-remote/journal-upload.h @@ -40,7 +40,7 @@ typedef struct Uploader { int input; /* journal stuff */ - sd_journal* journal; + sd_journal *journal; entry_state entry_state; const void *field_data;