journal-remote: coding style fixlets
Co-authored-by: Andrii Chubatiuk <andrew.chubatiuk@gmail.com>
This commit is contained in:
committed by
Daan De Meyer
co-authored by
Andrii Chubatiuk
parent
594d2ff9d6
commit
146ec85ef5
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user