diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-16 22:32:23 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-19 08:33:33 +0900 |
commit | de010b0b2e50cf0b3837ce350b116bc92605f67a (patch) | |
tree | 226685fbb97461692562035501ebc21a314f718c /src/journal-remote | |
parent | 80a226b26b5e00a2ef9e85d1321da44cd14d051b (diff) | |
download | systemd-de010b0b2e50cf0b3837ce350b116bc92605f67a.tar.gz |
strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
Diffstat (limited to 'src/journal-remote')
-rw-r--r-- | src/journal-remote/journal-remote-main.c | 1 | ||||
-rw-r--r-- | src/journal-remote/microhttpd-util.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 6ab91263b1..13ca22ef26 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -594,7 +594,6 @@ static int create_remoteserver( const char* trust) { int r, n, fd; - char **file; r = journal_remote_server_init(s, arg_output, arg_split_mode, arg_compress, arg_seal); if (r < 0) diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index e6a8254491..a8119bd687 100644 --- a/src/journal-remote/microhttpd-util.c +++ b/src/journal-remote/microhttpd-util.c @@ -151,18 +151,17 @@ static int log_enable_gnutls_category(const char *cat) { } int setup_gnutls_logger(char **categories) { - char **cat; int r; gnutls_global_set_log_function(log_func_gnutls); - if (categories) { + if (categories) STRV_FOREACH(cat, categories) { r = log_enable_gnutls_category(*cat); if (r < 0) return r; } - } else + else log_reset_gnutls_level(); return 0; |