diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/acl-util.c | 2 | ||||
-rw-r--r-- | src/shared/ask-password-api.c | 2 | ||||
-rw-r--r-- | src/shared/cgroup-show.c | 2 | ||||
-rw-r--r-- | src/shared/clean-ipc.c | 2 | ||||
-rw-r--r-- | src/shared/conf-parser.c | 2 | ||||
-rw-r--r-- | src/shared/install-printf.c | 2 | ||||
-rw-r--r-- | src/shared/logs-show.c | 13 |
7 files changed, 11 insertions, 14 deletions
diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c index 2aa951fce9..79a3b9591d 100644 --- a/src/shared/acl-util.c +++ b/src/shared/acl-util.c @@ -162,7 +162,7 @@ int add_base_acls_if_needed(acl_t *acl_p, const char *path) { int acl_search_groups(const char *path, char ***ret_groups) { _cleanup_strv_free_ char **g = NULL; - _cleanup_(acl_free) acl_t acl = NULL; + _cleanup_(acl_freep) acl_t acl = NULL; bool ret = false; acl_entry_t entry; int r; diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 2597cfc648..3e877920da 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -43,7 +43,7 @@ #include "ask-password-api.h" #include "fd-util.h" #include "fileio.h" -#include "formats-util.h" +#include "format-util.h" #include "io-util.h" #include "log.h" #include "macro.h" diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c index 4db6cefb6e..5d21742a09 100644 --- a/src/shared/cgroup-show.c +++ b/src/shared/cgroup-show.c @@ -28,7 +28,7 @@ #include "cgroup-show.h" #include "cgroup-util.h" #include "fd-util.h" -#include "formats-util.h" +#include "format-util.h" #include "locale-util.h" #include "macro.h" #include "output-mode.h" diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c index d5db604f03..f2d1555c13 100644 --- a/src/shared/clean-ipc.c +++ b/src/shared/clean-ipc.c @@ -36,7 +36,7 @@ #include "dirent-util.h" #include "fd-util.h" #include "fileio.h" -#include "formats-util.h" +#include "format-util.h" #include "log.h" #include "macro.h" #include "string-util.h" diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 19a371c865..265ac83dc0 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -781,7 +781,7 @@ int config_parse_strv(const char *unit, for (;;) { char *word = NULL; - r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE); + r = extract_first_word(&rvalue, &word, NULL, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE); if (r == 0) break; if (r == -ENOMEM) diff --git a/src/shared/install-printf.c b/src/shared/install-printf.c index 007c632f35..823fb61cda 100644 --- a/src/shared/install-printf.c +++ b/src/shared/install-printf.c @@ -22,7 +22,7 @@ #include <string.h> #include <unistd.h> -#include "formats-util.h" +#include "format-util.h" #include "install-printf.h" #include "install.h" #include "macro.h" diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index f9d9c4ed62..75ea25c8ac 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -33,7 +33,7 @@ #include "alloc-util.h" #include "fd-util.h" -#include "formats-util.h" +#include "format-util.h" #include "hashmap.h" #include "hostname-util.h" #include "io-util.h" @@ -223,10 +223,7 @@ static int output_timestamp_monotonic(FILE *f, sd_journal *j, const char *monoto if (r < 0) return log_error_errno(r, "Failed to get monotonic timestamp: %m"); - fprintf(f, "[%5llu.%06llu]", - (unsigned long long) (t / USEC_PER_SEC), - (unsigned long long) (t % USEC_PER_SEC)); - + fprintf(f, "[%5"PRI_USEC".%06"PRI_USEC"]", t / USEC_PER_SEC, t % USEC_PER_SEC); return 1 + 5 + 1 + 6 + 1; } @@ -268,7 +265,7 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou switch (mode) { case OUTPUT_SHORT_UNIX: - xsprintf(buf, "%10llu.%06llu", (unsigned long long) t, (unsigned long long) (x % USEC_PER_SEC)); + xsprintf(buf, "%10"PRI_TIME".%06"PRIu64, t, x % USEC_PER_SEC); break; case OUTPUT_SHORT_ISO: @@ -292,7 +289,7 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou assert(sizeof(buf) > strlen(buf)); k = sizeof(buf) - strlen(buf); - r = snprintf(buf + strlen(buf), k, ".%06llu", (unsigned long long) (x % USEC_PER_SEC)); + r = snprintf(buf + strlen(buf), k, ".%06"PRIu64, x % USEC_PER_SEC); if (r <= 0 || (size_t) r >= k) { /* too long? */ log_error("Failed to format precise time"); return -EINVAL; @@ -418,7 +415,7 @@ static int output_short( if (flags & OUTPUT_NO_HOSTNAME) { /* Suppress display of the hostname if this is requested. */ - hostname = NULL; + hostname = mfree(hostname); hostname_len = 0; } |