summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/basic/bus-label.c4
-rw-r--r--src/basic/bus-label.h6
-rw-r--r--src/basic/cgroup-util.c2
-rw-r--r--src/basic/cgroup-util.h2
-rw-r--r--src/basic/env-util.c2
-rw-r--r--src/basic/env-util.h2
-rw-r--r--src/basic/ether-addr-util.c2
-rw-r--r--src/basic/ether-addr-util.h4
-rw-r--r--src/basic/fd-util.c2
-rw-r--r--src/basic/fd-util.h4
-rw-r--r--src/basic/format-util.c2
-rw-r--r--src/basic/format-util.h6
-rw-r--r--src/basic/hexdecoct.c4
-rw-r--r--src/basic/hexdecoct.h4
-rw-r--r--src/basic/proc-cmdline.c2
-rw-r--r--src/basic/proc-cmdline.h2
-rw-r--r--src/basic/replace-var.c2
-rw-r--r--src/basic/replace-var.h2
-rw-r--r--src/basic/string-util.c42
-rw-r--r--src/basic/string-util.h50
-rw-r--r--src/basic/sysctl-util.c2
-rw-r--r--src/basic/sysctl-util.h2
-rw-r--r--src/basic/time-util.c2
-rw-r--r--src/basic/unit-def.c2
-rw-r--r--src/basic/unit-def.h2
-rw-r--r--src/basic/unit-name.c2
-rw-r--r--src/basic/unit-name.h2
-rw-r--r--src/basic/utf8.c6
-rw-r--r--src/basic/utf8.h8
-rw-r--r--src/boot/efi/efi-string.c4
-rw-r--r--src/boot/efi/efi-string.h12
-rw-r--r--src/core/job.c2
-rw-r--r--src/core/job.h2
-rw-r--r--src/core/socket.c2
-rw-r--r--src/core/socket.h2
-rw-r--r--src/core/unit.c4
-rw-r--r--src/core/unit.h4
-rw-r--r--src/libsystemd/sd-bus/bus-internal.c2
-rw-r--r--src/libsystemd/sd-bus/bus-internal.h4
-rw-r--r--src/libsystemd/sd-bus/bus-match.c2
-rw-r--r--src/libsystemd/sd-bus/bus-match.h2
-rw-r--r--src/libsystemd/sd-journal/journal-internal.h2
-rw-r--r--src/libsystemd/sd-journal/sd-journal.c2
-rw-r--r--src/login/logind-seat-dbus.c2
-rw-r--r--src/login/logind-seat-dbus.h2
-rw-r--r--src/login/logind-session-dbus.c2
-rw-r--r--src/login/logind-session-dbus.h2
-rw-r--r--src/login/logind-user-dbus.c2
-rw-r--r--src/login/logind-user-dbus.h2
-rw-r--r--src/machine/image-dbus.c2
-rw-r--r--src/machine/image-dbus.h2
-rw-r--r--src/machine/machine-dbus.c2
-rw-r--r--src/machine/machine-dbus.h2
-rw-r--r--src/network/networkd-link-bus.c2
-rw-r--r--src/network/networkd-link-bus.h2
-rw-r--r--src/resolve/resolved-link-bus.c2
-rw-r--r--src/resolve/resolved-link-bus.h2
-rw-r--r--src/shared/cpu-set-util.c2
-rw-r--r--src/shared/cpu-set-util.h2
-rw-r--r--src/shared/fstab-util.c2
-rw-r--r--src/shared/fstab-util.h2
-rw-r--r--src/shared/pkcs11-util.c6
-rw-r--r--src/shared/pkcs11-util.h6
-rw-r--r--src/shared/tpm2-util.c10
-rw-r--r--src/shared/tpm2-util.h10
-rw-r--r--src/systemd/sd-id128.h4
-rw-r--r--src/xdg-autostart-generator/xdg-autostart-service.c2
-rw-r--r--src/xdg-autostart-generator/xdg-autostart-service.h2
68 files changed, 148 insertions, 148 deletions
diff --git a/src/basic/bus-label.c b/src/basic/bus-label.c
index d33fc92290..6371a9dba0 100644
--- a/src/basic/bus-label.c
+++ b/src/basic/bus-label.c
@@ -7,7 +7,7 @@
#include "hexdecoct.h"
#include "macro.h"
-char *bus_label_escape(const char *s) {
+char* bus_label_escape(const char *s) {
char *r, *t;
const char *f;
@@ -42,7 +42,7 @@ char *bus_label_escape(const char *s) {
return r;
}
-char *bus_label_unescape_n(const char *f, size_t l) {
+char* bus_label_unescape_n(const char *f, size_t l) {
char *r, *t;
size_t i;
diff --git a/src/basic/bus-label.h b/src/basic/bus-label.h
index 446daba7f2..7630eff295 100644
--- a/src/basic/bus-label.h
+++ b/src/basic/bus-label.h
@@ -6,9 +6,9 @@
#include "string-util.h"
-char *bus_label_escape(const char *s);
-char *bus_label_unescape_n(const char *f, size_t l);
+char* bus_label_escape(const char *s);
+char* bus_label_unescape_n(const char *f, size_t l);
-static inline char *bus_label_unescape(const char *f) {
+static inline char* bus_label_unescape(const char *f) {
return bus_label_unescape_n(f, strlen_ptr(f));
}
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 553ee6075a..65fbd09159 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1691,7 +1691,7 @@ int cg_escape(const char *p, char **ret) {
return 0;
}
-char *cg_unescape(const char *p) {
+char* cg_unescape(const char *p) {
assert(p);
/* The return value of this function (unlike cg_escape())
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index a8871785b6..84009b47c1 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -298,7 +298,7 @@ int cg_path_decode_unit(const char *cgroup, char **ret_unit);
bool cg_needs_escape(const char *p);
int cg_escape(const char *p, char **ret);
-char *cg_unescape(const char *p) _pure_;
+char* cg_unescape(const char *p) _pure_;
bool cg_controller_is_valid(const char *p);
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index 2bd532caa1..3e385e5ee4 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -552,7 +552,7 @@ char* strv_env_get_n(char * const *l, const char *name, size_t k, ReplaceEnvFlag
return NULL;
}
-char *strv_env_pairs_get(char **l, const char *name) {
+char* strv_env_pairs_get(char **l, const char *name) {
char *result = NULL;
assert(name);
diff --git a/src/basic/env-util.h b/src/basic/env-util.h
index 6610ca8ca1..5f20f1d69c 100644
--- a/src/basic/env-util.h
+++ b/src/basic/env-util.h
@@ -59,7 +59,7 @@ static inline char* strv_env_get(char * const *x, const char *n) {
return strv_env_get_n(x, n, SIZE_MAX, 0);
}
-char *strv_env_pairs_get(char **l, const char *name) _pure_;
+char* strv_env_pairs_get(char **l, const char *name) _pure_;
int getenv_bool(const char *p);
int secure_getenv_bool(const char *p);
diff --git a/src/basic/ether-addr-util.c b/src/basic/ether-addr-util.c
index 4bf91f690f..11336572cd 100644
--- a/src/basic/ether-addr-util.c
+++ b/src/basic/ether-addr-util.c
@@ -11,7 +11,7 @@
#include "macro.h"
#include "string-util.h"
-char *hw_addr_to_string_full(
+char* hw_addr_to_string_full(
const struct hw_addr_data *addr,
HardwareAddressToStringFlags flags,
char buffer[static HW_ADDR_TO_STRING_MAX]) {
diff --git a/src/basic/ether-addr-util.h b/src/basic/ether-addr-util.h
index 187e4ef583..8ebf9c031d 100644
--- a/src/basic/ether-addr-util.h
+++ b/src/basic/ether-addr-util.h
@@ -36,11 +36,11 @@ typedef enum HardwareAddressToStringFlags {
} HardwareAddressToStringFlags;
#define HW_ADDR_TO_STRING_MAX (3*HW_ADDR_MAX_SIZE)
-char *hw_addr_to_string_full(
+char* hw_addr_to_string_full(
const struct hw_addr_data *addr,
HardwareAddressToStringFlags flags,
char buffer[static HW_ADDR_TO_STRING_MAX]);
-static inline char *hw_addr_to_string(const struct hw_addr_data *addr, char buffer[static HW_ADDR_TO_STRING_MAX]) {
+static inline char* hw_addr_to_string(const struct hw_addr_data *addr, char buffer[static HW_ADDR_TO_STRING_MAX]) {
return hw_addr_to_string_full(addr, 0, buffer);
}
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index b4d11fa462..d5e733293c 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -1104,7 +1104,7 @@ const char* accmode_to_string(int flags) {
}
}
-char *format_proc_pid_fd_path(char buf[static PROC_PID_FD_PATH_MAX], pid_t pid, int fd) {
+char* format_proc_pid_fd_path(char buf[static PROC_PID_FD_PATH_MAX], pid_t pid, int fd) {
assert(buf);
assert(fd >= 0);
assert(pid >= 0);
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 4080b67a66..3a56d2cbbf 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -141,7 +141,7 @@ int fds_are_same_mount(int fd1, int fd2);
#define PROC_FD_PATH_MAX \
(STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int))
-static inline char *format_proc_fd_path(char buf[static PROC_FD_PATH_MAX], int fd) {
+static inline char* format_proc_fd_path(char buf[static PROC_FD_PATH_MAX], int fd) {
assert(buf);
assert(fd >= 0);
assert_se(snprintf_ok(buf, PROC_FD_PATH_MAX, "/proc/self/fd/%i", fd));
@@ -155,7 +155,7 @@ static inline char *format_proc_fd_path(char buf[static PROC_FD_PATH_MAX], int f
#define PROC_PID_FD_PATH_MAX \
(STRLEN("/proc//fd/") + DECIMAL_STR_MAX(pid_t) + DECIMAL_STR_MAX(int))
-char *format_proc_pid_fd_path(char buf[static PROC_PID_FD_PATH_MAX], pid_t pid, int fd);
+char* format_proc_pid_fd_path(char buf[static PROC_PID_FD_PATH_MAX], pid_t pid, int fd);
/* Kinda the same as FORMAT_PROC_FD_PATH(), but goes by PID rather than "self" symlink */
#define FORMAT_PROC_PID_FD_PATH(pid, fd) \
diff --git a/src/basic/format-util.c b/src/basic/format-util.c
index 445fecc8ca..7098bf6a99 100644
--- a/src/basic/format-util.c
+++ b/src/basic/format-util.c
@@ -37,7 +37,7 @@ int format_ifname_full_alloc(int ifindex, FormatIfnameFlag flag, char **ret) {
return strdup_to(ret, buf);
}
-char *format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag) {
+char* format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag) {
typedef struct {
const char *suffix;
uint64_t factor;
diff --git a/src/basic/format-util.h b/src/basic/format-util.h
index ba7cff6a8b..4a030b7557 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
@@ -81,7 +81,7 @@ static inline int format_ifname_alloc(int ifindex, char **ret) {
return format_ifname_full_alloc(ifindex, 0, ret);
}
-static inline char *_format_ifname_full(int ifindex, FormatIfnameFlag flag, char buf[static IF_NAMESIZE]) {
+static inline char* _format_ifname_full(int ifindex, FormatIfnameFlag flag, char buf[static IF_NAMESIZE]) {
(void) format_ifname_full(ifindex, flag, buf);
return buf;
}
@@ -97,10 +97,10 @@ typedef enum {
#define FORMAT_BYTES_MAX 16U
-char *format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag) _warn_unused_result_;
+char* format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag) _warn_unused_result_;
_warn_unused_result_
-static inline char *format_bytes(char *buf, size_t l, uint64_t t) {
+static inline char* format_bytes(char *buf, size_t l, uint64_t t) {
return format_bytes_full(buf, l, t, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | FORMAT_BYTES_TRAILING_B);
}
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index 4cb67d94a4..c474b60776 100644
--- a/src/basic/hexdecoct.c
+++ b/src/basic/hexdecoct.c
@@ -55,7 +55,7 @@ int unhexchar(char c) {
return -EINVAL;
}
-char *hexmem(const void *p, size_t l) {
+char* hexmem(const void *p, size_t l) {
const uint8_t *x;
char *r, *z;
@@ -188,7 +188,7 @@ int unbase32hexchar(char c) {
return -EINVAL;
}
-char *base32hexmem(const void *p, size_t l, bool padding) {
+char* base32hexmem(const void *p, size_t l, bool padding) {
char *r, *z;
const uint8_t *x;
size_t len;
diff --git a/src/basic/hexdecoct.h b/src/basic/hexdecoct.h
index 0a10af3e16..d160ca28c9 100644
--- a/src/basic/hexdecoct.h
+++ b/src/basic/hexdecoct.h
@@ -17,7 +17,7 @@ int undecchar(char c) _const_;
char hexchar(int x) _const_;
int unhexchar(char c) _const_;
-char *hexmem(const void *p, size_t l);
+char* hexmem(const void *p, size_t l);
int unhexmem_full(const char *p, size_t l, bool secure, void **ret_data, size_t *ret_size);
static inline int unhexmem(const char *p, void **ret_data, size_t *ret_size) {
return unhexmem_full(p, SIZE_MAX, false, ret_data, ret_size);
@@ -30,7 +30,7 @@ char base64char(int x) _const_;
char urlsafe_base64char(int x) _const_;
int unbase64char(char c) _const_;
-char *base32hexmem(const void *p, size_t l, bool padding);
+char* base32hexmem(const void *p, size_t l, bool padding);
int unbase32hexmem(const char *p, size_t l, bool padding, void **mem, size_t *len);
ssize_t base64mem_full(const void *p, size_t l, size_t line_break, char **ret);
diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
index ce1ba3a1ea..5dad0e50d4 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -253,7 +253,7 @@ static bool relaxed_equal_char(char a, char b) {
(a == '-' && b == '_');
}
-char *proc_cmdline_key_startswith(const char *s, const char *prefix) {
+char* proc_cmdline_key_startswith(const char *s, const char *prefix) {
assert(s);
assert(prefix);
diff --git a/src/basic/proc-cmdline.h b/src/basic/proc-cmdline.h
index 9502fb8d43..7359d5c275 100644
--- a/src/basic/proc-cmdline.h
+++ b/src/basic/proc-cmdline.h
@@ -28,7 +28,7 @@ int proc_cmdline_get_bool(const char *key, ProcCmdlineFlags flags, bool *ret);
int proc_cmdline_get_key_many_internal(ProcCmdlineFlags flags, ...);
#define proc_cmdline_get_key_many(flags, ...) proc_cmdline_get_key_many_internal(flags, __VA_ARGS__, NULL)
-char *proc_cmdline_key_startswith(const char *s, const char *prefix);
+char* proc_cmdline_key_startswith(const char *s, const char *prefix);
bool proc_cmdline_key_streq(const char *x, const char *y);
/* A little helper call, to be used in proc_cmdline_parse_t callbacks */
diff --git a/src/basic/replace-var.c b/src/basic/replace-var.c
index 01c26ce74c..4813ac3d2b 100644
--- a/src/basic/replace-var.c
+++ b/src/basic/replace-var.c
@@ -36,7 +36,7 @@ static int get_variable(const char *b, char **r) {
return 1;
}
-char *replace_var(const char *text, char *(*lookup)(const char *variable, void *userdata), void *userdata) {
+char* replace_var(const char *text, char *(*lookup)(const char *variable, void *userdata), void *userdata) {
char *r, *t;
const char *f;
size_t l;
diff --git a/src/basic/replace-var.h b/src/basic/replace-var.h
index 644d9dfce4..8b9b2aa5ba 100644
--- a/src/basic/replace-var.h
+++ b/src/basic/replace-var.h
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-char *replace_var(const char *text, char *(*lookup)(const char *variable, void *userdata), void *userdata);
+char* replace_var(const char *text, char *(*lookup)(const char *variable, void *userdata), void *userdata);
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index 274a3f3a04..1715d62a39 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -46,7 +46,7 @@ char* first_word(const char *s, const char *word) {
return (char*) nw;
}
-char *strnappend(const char *s, const char *suffix, size_t b) {
+char* strnappend(const char *s, const char *suffix, size_t b) {
size_t a;
char *r;
@@ -77,7 +77,7 @@ char *strnappend(const char *s, const char *suffix, size_t b) {
return r;
}
-char *strjoin_real(const char *x, ...) {
+char* strjoin_real(const char *x, ...) {
va_list ap;
size_t l = 1;
char *r, *p;
@@ -109,7 +109,7 @@ char *strjoin_real(const char *x, ...) {
return r;
}
-char *strstrip(char *s) {
+char* strstrip(char *s) {
if (!s)
return NULL;
@@ -118,7 +118,7 @@ char *strstrip(char *s) {
return delete_trailing_chars(skip_leading_chars(s, WHITESPACE), WHITESPACE);
}
-char *delete_chars(char *s, const char *bad) {
+char* delete_chars(char *s, const char *bad) {
char *f, *t;
/* Drops all specified bad characters, regardless where in the string */
@@ -141,7 +141,7 @@ char *delete_chars(char *s, const char *bad) {
return s;
}
-char *delete_trailing_chars(char *s, const char *bad) {
+char* delete_trailing_chars(char *s, const char *bad) {
char *c = s;
/* Drops all specified bad characters, at the end of the string */
@@ -161,7 +161,7 @@ char *delete_trailing_chars(char *s, const char *bad) {
return s;
}
-char *truncate_nl_full(char *s, size_t *ret_len) {
+char* truncate_nl_full(char *s, size_t *ret_len) {
size_t n;
assert(s);
@@ -189,7 +189,7 @@ char ascii_toupper(char x) {
return x;
}
-char *ascii_strlower(char *t) {
+char* ascii_strlower(char *t) {
assert(t);
for (char *p = t; *p; p++)
@@ -198,7 +198,7 @@ char *ascii_strlower(char *t) {
return t;
}
-char *ascii_strupper(char *t) {
+char* ascii_strupper(char *t) {
assert(t);
for (char *p = t; *p; p++)
@@ -207,7 +207,7 @@ char *ascii_strupper(char *t) {
return t;
}
-char *ascii_strlower_n(char *t, size_t n) {
+char* ascii_strlower_n(char *t, size_t n) {
if (n <= 0)
return t;
@@ -389,7 +389,7 @@ static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_le
return t;
}
-char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
+char* ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
size_t x, k, len, len2;
const char *i, *j;
int r;
@@ -524,7 +524,7 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne
return e;
}
-char *cellescape(char *buf, size_t len, const char *s) {
+char* cellescape(char *buf, size_t len, const char *s) {
/* Escape and ellipsize s into buffer buf of size len. Only non-control ASCII
* characters are copied as they are, everything else is escaped. The result
* is different then if escaping and ellipsization was performed in two
@@ -630,7 +630,7 @@ int strgrowpad0(char **s, size_t l) {
return 0;
}
-char *strreplace(const char *text, const char *old_string, const char *new_string) {
+char* strreplace(const char *text, const char *old_string, const char *new_string) {
size_t l, old_len, new_len;
char *t, *ret = NULL;
const char *f;
@@ -692,7 +692,7 @@ static void advance_offsets(
shift[1] += size;
}
-char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) {
+char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) {
const char *begin = NULL;
enum {
STATE_OTHER,
@@ -824,7 +824,7 @@ char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]) {
return *ibuf;
}
-char *strextend_with_separator_internal(char **x, const char *separator, ...) {
+char* strextend_with_separator_internal(char **x, const char *separator, ...) {
size_t f, l, l_separator;
bool need_separator;
char *nr, *p;
@@ -980,7 +980,7 @@ oom:
return -ENOMEM;
}
-char *strextendn(char **x, const char *s, size_t l) {
+char* strextendn(char **x, const char *s, size_t l) {
assert(x);
assert(s || l == 0);
@@ -1007,7 +1007,7 @@ char *strextendn(char **x, const char *s, size_t l) {
return *x;
}
-char *strrep(const char *s, unsigned n) {
+char* strrep(const char *s, unsigned n) {
char *r, *p;
size_t l;
@@ -1288,7 +1288,7 @@ bool streq_skip_trailing_chars(const char *s1, const char *s2, const char *ok) {
return in_charset(s1, ok) && in_charset(s2, ok);
}
-char *string_replace_char(char *str, char old_char, char new_char) {
+char* string_replace_char(char *str, char old_char, char new_char) {
assert(str);
assert(old_char != '\0');
assert(new_char != '\0');
@@ -1358,14 +1358,14 @@ size_t strspn_from_end(const char *str, const char *accept) {
return n;
}
-char *strdupspn(const char *a, const char *accept) {
+char* strdupspn(const char *a, const char *accept) {
if (isempty(a) || isempty(accept))
return strdup("");
return strndup(a, strspn(a, accept));
}
-char *strdupcspn(const char *a, const char *reject) {
+char* strdupcspn(const char *a, const char *reject) {
if (isempty(a))
return strdup("");
if (isempty(reject))
@@ -1374,7 +1374,7 @@ char *strdupcspn(const char *a, const char *reject) {
return strndup(a, strcspn(a, reject));
}
-char *find_line_startswith(const char *haystack, const char *needle) {
+char* find_line_startswith(const char *haystack, const char *needle) {
char *p;
assert(haystack);
@@ -1485,7 +1485,7 @@ ssize_t strlevenshtein(const char *x, const char *y) {
return t1[yl];
}
-char *strrstr(const char *haystack, const char *needle) {
+char* strrstr(const char *haystack, const char *needle) {
/* Like strstr() but returns the last rather than the first occurrence of "needle" in "haystack". */
if (!haystack || !needle)
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 63fcbe2337..eb1cd2d9e9 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -33,7 +33,7 @@ static inline char* strstr_ptr(const char *haystack, const char *needle) {
return strstr(haystack, needle);
}
-static inline char *strstrafter(const char *haystack, const char *needle) {
+static inline char* strstrafter(const char *haystack, const char *needle) {
char *p;
/* Returns NULL if not found, or pointer to first character after needle if found */
@@ -104,11 +104,11 @@ static inline const char* empty_or_dash_to_null(const char *p) {
(typeof(p)) (empty_or_dash(_p) ? NULL : _p); \
})
-char *first_word(const char *s, const char *word) _pure_;
+char* first_word(const char *s, const char *word) _pure_;
-char *strnappend(const char *s, const char *suffix, size_t length);
+char* strnappend(const char *s, const char *suffix, size_t length);
-char *strjoin_real(const char *x, ...) _sentinel_;
+char* strjoin_real(const char *x, ...) _sentinel_;
#define strjoin(a, ...) strjoin_real((a), __VA_ARGS__, NULL)
#define strjoina(a, ...) \
@@ -126,11 +126,11 @@ char *strjoin_real(const char *x, ...) _sentinel_;
_d_; \
})
-char *strstrip(char *s);
-char *delete_chars(char *s, const char *bad);
-char *delete_trailing_chars(char *s, const char *bad);
-char *truncate_nl_full(char *s, size_t *ret_len);
-static inline char *truncate_nl(char *s) {
+char* strstrip(char *s);
+char* delete_chars(char *s, const char *bad);
+char* delete_trailing_chars(char *s, const char *bad);
+char* truncate_nl_full(char *s, size_t *ret_len);
+static inline char* truncate_nl(char *s) {
return truncate_nl_full(s, NULL);
}
@@ -145,11 +145,11 @@ static inline char* skip_leading_chars(const char *s, const char *bad) {
}
char ascii_tolower(char x);
-char *ascii_strlower(char *s);
-char *ascii_strlower_n(char *s, size_t n);
+char* ascii_strlower(char *s);
+char* ascii_strlower_n(char *s, size_t n);
char ascii_toupper(char x);
-char *ascii_strupper(char *s);
+char* ascii_strupper(char *s);
int ascii_strcasecmp_n(const char *a, const char *b, size_t n);
int ascii_strcasecmp_nn(const char *a, size_t n, const char *b, size_t m);
@@ -172,12 +172,12 @@ static inline bool char_is_cc(char p) {
}
bool string_has_cc(const char *p, const char *ok) _pure_;
-char *ellipsize_mem(const char *s, size_t old_length_bytes, size_t new_length_columns, unsigned percent);
-static inline char *ellipsize(const char *s, size_t length, unsigned percent) {
+char* ellipsize_mem(const char *s, size_t old_length_bytes, size_t new_length_columns, unsigned percent);
+static inline char* ellipsize(const char *s, size_t length, unsigned percent) {
return ellipsize_mem(s, strlen(s), length, percent);
}
-char *cellescape(char *buf, size_t len, const char *s);
+char* cellescape(char *buf, size_t len, const char *s);
/* This limit is arbitrary, enough to give some idea what the string contains */
#define CELLESCAPE_DEFAULT_LENGTH 64
@@ -186,20 +186,20 @@ char* strshorten(char *s, size_t l);
int strgrowpad0(char **s, size_t l);
-char *strreplace(const char *text, const char *old_string, const char *new_string);
+char* strreplace(const char *text, const char *old_string, const char *new_string);
-char *strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]);
+char* strip_tab_ansi(char **ibuf, size_t *_isz, size_t highlight[2]);
-char *strextend_with_separator_internal(char **x, const char *separator, ...) _sentinel_;
+char* strextend_with_separator_internal(char **x, const char *separator, ...) _sentinel_;
#define strextend_with_separator(x, separator, ...) strextend_with_separator_internal(x, separator, __VA_ARGS__, NULL)
#define strextend(x, ...) strextend_with_separator_internal(x, NULL, __VA_ARGS__, NULL)
-char *strextendn(char **x, const char *s, size_t l);
+char* strextendn(char **x, const char *s, size_t l);
int strextendf_with_separator(char **x, const char *separator, const char *format, ...) _printf_(3,4);
#define strextendf(x, ...) strextendf_with_separator(x, NULL, __VA_ARGS__)
-char *strrep(const char *s, unsigned n);
+char* strrep(const char *s, unsigned n);
#define strrepa(s, n) \
({ \
@@ -285,7 +285,7 @@ static inline int string_contains_word(const char *string, const char *separator
bool streq_skip_trailing_chars(const char *s1, const char *s2, const char *ok);
-char *string_replace_char(char *str, char old_char, char new_char);
+char* string_replace_char(char *str, char old_char, char new_char);
typedef enum MakeCStringMode {
MAKE_CSTRING_REFUSE_TRAILING_NUL,
@@ -299,10 +299,10 @@ int make_cstring(const char *s, size_t n, MakeCStringMode mode, char **ret);
size_t strspn_from_end(const char *str, const char *accept);
-char *strdupspn(const char *a, const char *accept);
-char *strdupcspn(const char *a, const char *reject);
+char* strdupspn(const char *a, const char *accept);
+char* strdupcspn(const char *a, const char *reject);
-char *find_line_startswith(const char *haystack, const char *needle);
+char* find_line_startswith(const char *haystack, const char *needle);
bool version_is_valid(const char *s);
@@ -310,4 +310,4 @@ bool version_is_valid_versionspec(const char *s);
ssize_t strlevenshtein(const char *x, const char *y);
-char *strrstr(const char *haystack, const char *needle);
+char* strrstr(const char *haystack, const char *needle);
diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
index 9a1933f579..b284c9ccd2 100644
--- a/src/basic/sysctl-util.c
+++ b/src/basic/sysctl-util.c
@@ -15,7 +15,7 @@
#include "string-util.h"
#include "sysctl-util.h"
-char *sysctl_normalize(char *s) {
+char* sysctl_normalize(char *s) {
char *n;
n = strpbrk(s, "/.");
diff --git a/src/basic/sysctl-util.h b/src/basic/sysctl-util.h
index 7192e8c0b0..2bf5491703 100644
--- a/src/basic/sysctl-util.h
+++ b/src/basic/sysctl-util.h
@@ -8,7 +8,7 @@
#include "stdio-util.h"
#include "string-util.h"
-char *sysctl_normalize(char *s);
+char* sysctl_normalize(char *s);
int sysctl_read(const char *property, char **value);
int sysctl_write(const char *property, const char *value);
int sysctl_writef(const char *property, const char *format, ...) _printf_(2, 3);
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index cd35e8a73c..ed6fdc3e49 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -312,7 +312,7 @@ struct timeval *timeval_store(struct timeval *tv, usec_t u) {
return tv;
}
-char *format_timestamp_style(
+char* format_timestamp_style(
char *buf,
size_t l,
usec_t t,
diff --git a/src/basic/unit-def.c b/src/basic/unit-def.c
index 09d881b844..6ffdcd37c8 100644
--- a/src/basic/unit-def.c
+++ b/src/basic/unit-def.c
@@ -6,7 +6,7 @@
#include "unit-def.h"
#include "unit-name.h"
-char *unit_dbus_path_from_name(const char *name) {
+char* unit_dbus_path_from_name(const char *name) {
_cleanup_free_ char *e = NULL;
assert(name);
diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h
index b818b5ea26..cf74c9de2f 100644
--- a/src/basic/unit-def.h
+++ b/src/basic/unit-def.h
@@ -280,7 +280,7 @@ typedef enum NotifyAccess {
_NOTIFY_ACCESS_INVALID = -EINVAL,
} NotifyAccess;
-char *unit_dbus_path_from_name(const char *name);
+char* unit_dbus_path_from_name(const char *name);
int unit_name_from_dbus_path(const char *path, char **name);
const char* unit_dbus_interface_from_type(UnitType t);
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
index 4e2f77c03d..43c15213ef 100644
--- a/src/basic/unit-name.c
+++ b/src/basic/unit-name.c
@@ -331,7 +331,7 @@ static char *do_escape(const char *f, char *t) {
return t;
}
-char *unit_name_escape(const char *f) {
+char* unit_name_escape(const char *f) {
char *r, *t;
assert(f);
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index fa7295e250..44354541c4 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -35,7 +35,7 @@ int unit_name_change_suffix(const char *n, const char *suffix, char **ret);
int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret);
int unit_name_build_from_type(const char *prefix, const char *instance, UnitType type, char **ret);
-char *unit_name_escape(const char *f);
+char* unit_name_escape(const char *f);
int unit_name_unescape(const char *f, char **ret);
int unit_name_path_escape(const char *f, char **ret);
int unit_name_path_unescape(const char *f, char **ret);
diff --git a/src/basic/utf8.c b/src/basic/utf8.c
index 68b7c31aec..0d904e53af 100644
--- a/src/basic/utf8.c
+++ b/src/basic/utf8.c
@@ -153,7 +153,7 @@ char* utf8_is_valid_n(const char *str, size_t len_bytes) {
return (char*) str;
}
-char *utf8_escape_invalid(const char *str) {
+char* utf8_escape_invalid(const char *str) {
char *p, *s;
assert(str);
@@ -195,7 +195,7 @@ int utf8_char_console_width(const char *str) {
return unichar_iswide(c) ? 2 : 1;
}
-char *utf8_escape_non_printable_full(const char *str, size_t console_width, bool force_ellipsis) {
+char* utf8_escape_non_printable_full(const char *str, size_t console_width, bool force_ellipsis) {
char *p, *s, *prev_s;
size_t n = 0; /* estimated print width */
@@ -359,7 +359,7 @@ size_t utf8_encode_unichar(char *out_utf8, char32_t g) {
return 0;
}
-char *utf16_to_utf8(const char16_t *s, size_t length /* bytes! */) {
+char* utf16_to_utf8(const char16_t *s, size_t length /* bytes! */) {
const uint8_t *f;
char *r, *t;
diff --git a/src/basic/utf8.h b/src/basic/utf8.h
index de45fcba5b..8a5e884a0a 100644
--- a/src/basic/utf8.h
+++ b/src/basic/utf8.h
@@ -29,16 +29,16 @@ int utf8_to_ascii(const char *str, char replacement_char, char **ret);
bool utf8_is_printable_newline(const char* str, size_t length, bool allow_newline) _pure_;
#define utf8_is_printable(str, length) utf8_is_printable_newline(str, length, true)
-char *utf8_escape_invalid(const char *s);
-char *utf8_escape_non_printable_full(const char *str, size_t console_width, bool force_ellipsis);
-static inline char *utf8_escape_non_printable(const char *str) {
+char* utf8_escape_invalid(const char *s);
+char* utf8_escape_non_printable_full(const char *str, size_t console_width, bool force_ellipsis);
+static inline char* utf8_escape_non_printable(const char *str) {
return utf8_escape_non_printable_full(str, SIZE_MAX, false);
}
size_t utf8_encode_unichar(char *out_utf8, char32_t g);
size_t utf16_encode_unichar(char16_t *out, char32_t c);
-char *utf16_to_utf8(const char16_t *s, size_t length /* bytes! */);
+char* utf16_to_utf8(const char16_t *s, size_t length /* bytes! */);
char16_t *utf8_to_utf16(const char *s, size_t length);
size_t char16_strlen(const char16_t *s); /* returns the number of 16-bit words in the string (not bytes!) */
diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c
index 3bdb80216a..63481461a5 100644
--- a/src/boot/efi/efi-string.c
+++ b/src/boot/efi/efi-string.c
@@ -212,7 +212,7 @@ char16_t *xstrn8_to_16(const char *str8, size_t n) {
return str16;
}
-char *startswith8(const char *s, const char *prefix) {
+char* startswith8(const char *s, const char *prefix) {
size_t l;
assert(prefix);
@@ -412,7 +412,7 @@ bool parse_boolean(const char *v, bool *ret) {
return false;
}
-char *line_get_key_value(char *s, const char *sep, size_t *pos, char **ret_key, char **ret_value) {
+char* line_get_key_value(char *s, const char *sep, size_t *pos, char **ret_key, char **ret_value) {
char *line, *value;
size_t linelen;
diff --git a/src/boot/efi/efi-string.h b/src/boot/efi/efi-string.h
index 9ac919f421..c7c49a07aa 100644
--- a/src/boot/efi/efi-string.h
+++ b/src/boot/efi/efi-string.h
@@ -79,16 +79,16 @@ static inline bool strcaseeq16(const char16_t *s1, const char16_t *s2) {
return strcasecmp16(s1, s2) == 0;
}
-char *strcpy8(char * restrict dest, const char * restrict src);
+char* strcpy8(char * restrict dest, const char * restrict src);
char16_t *strcpy16(char16_t * restrict dest, const char16_t * restrict src);
-char *strchr8(const char *s, char c);
+char* strchr8(const char *s, char c);
char16_t *strchr16(const char16_t *s, char16_t c);
-char *xstrndup8(const char *s, size_t n);
+char* xstrndup8(const char *s, size_t n);
char16_t *xstrndup16(const char16_t *s, size_t n);
-static inline char *xstrdup8(const char *s) {
+static inline char* xstrdup8(const char *s) {
return xstrndup8(s, SIZE_MAX);
}
@@ -101,7 +101,7 @@ static inline char16_t *xstr8_to_16(const char *str8) {
return xstrn8_to_16(str8, strlen8(str8));
}
-char *startswith8(const char *s, const char *prefix);
+char* startswith8(const char *s, const char *prefix);
bool efi_fnmatch(const char16_t *pattern, const char16_t *haystack);
@@ -110,7 +110,7 @@ bool parse_number16(const char16_t *s, uint64_t *ret_u, const char16_t **ret_tai
bool parse_boolean(const char *v, bool *ret);
-char *line_get_key_value(char *s, const char *sep, size_t *pos, char **ret_key, char **ret_value);
+char* line_get_key_value(char *s, const char *sep, size_t *pos, char **ret_key, char **ret_value);
char16_t *hexdump(const void *data, size_t size);
diff --git a/src/core/job.c b/src/core/job.c
index fb32223e18..a877f9f06f 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -1197,7 +1197,7 @@ void job_add_to_dbus_queue(Job *j) {
j->in_dbus_queue = true;
}
-char *job_dbus_path(Job *j) {
+char* job_dbus_path(Job *j) {
char *p;
assert(j);
diff --git a/src/core/job.h b/src/core/job.h
index 8318b524b4..8e8d6ff08f 100644
--- a/src/core/job.h
+++ b/src/core/job.h
@@ -218,7 +218,7 @@ int job_start_timer(Job *j, bool job_running);
int job_run_and_invalidate(Job *j);
int job_finish_and_invalidate(Job *j, JobResult result, bool recursive, bool already);
-char *job_dbus_path(Job *j);
+char* job_dbus_path(Job *j);
void job_shutdown_magic(Job *j);
diff --git a/src/core/socket.c b/src/core/socket.c
index 63c4c1a7aa..400edeb86b 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -3410,7 +3410,7 @@ static int socket_get_timeout(Unit *u, usec_t *timeout) {
return 1;
}
-char *socket_fdname(Socket *s) {
+char* socket_fdname(Socket *s) {
assert(s);
/* Returns the name to use for $LISTEN_NAMES. If the user
diff --git a/src/core/socket.h b/src/core/socket.h
index 5e3929c5fa..55afee6122 100644
--- a/src/core/socket.h
+++ b/src/core/socket.h
@@ -186,7 +186,7 @@ int socket_port_to_address(const SocketPort *s, char **ret);
int socket_load_service_unit(Socket *s, int cfd, Unit **ret);
-char *socket_fdname(Socket *s);
+char* socket_fdname(Socket *s);
extern const UnitVTable socket_vtable;
diff --git a/src/core/unit.c b/src/core/unit.c
index cb93277f3e..e8b32e862d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3337,7 +3337,7 @@ int set_unit_path(const char *p) {
return RET_NERRNO(setenv("SYSTEMD_UNIT_PATH", p, 1));
}
-char *unit_dbus_path(Unit *u) {
+char* unit_dbus_path(Unit *u) {
assert(u);
if (!u->id)
@@ -3346,7 +3346,7 @@ char *unit_dbus_path(Unit *u) {
return unit_dbus_path_from_name(u->id);
}
-char *unit_dbus_path_invocation_id(Unit *u) {
+char* unit_dbus_path_invocation_id(Unit *u) {
assert(u);
if (sd_id128_is_null(u->invocation_id))
diff --git a/src/core/unit.h b/src/core/unit.h
index 419c72e7df..042ec3b3ea 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -886,8 +886,8 @@ bool unit_job_is_applicable(Unit *u, JobType j);
int set_unit_path(const char *p);
-char *unit_dbus_path(Unit *u);
-char *unit_dbus_path_invocation_id(Unit *u);
+char* unit_dbus_path(Unit *u);
+char* unit_dbus_path_invocation_id(Unit *u);
int unit_load_related_unit(Unit *u, const char *type, Unit **_found);
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c
index 2df7a5b229..56f9373af1 100644
--- a/src/libsystemd/sd-bus/bus-internal.c
+++ b/src/libsystemd/sd-bus/bus-internal.c
@@ -286,7 +286,7 @@ const char* bus_message_type_to_string(uint8_t u) {
return NULL;
}
-char *bus_address_escape(const char *v) {
+char* bus_address_escape(const char *v) {
const char *a;
char *r, *b;
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index e2cd1f49ed..0d99d2d654 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -360,7 +360,7 @@ bool service_name_is_valid(const char *p) _pure_;
bool member_name_is_valid(const char *p) _pure_;
bool object_path_is_valid(const char *p) _pure_;
-char *object_path_startswith(const char *a, const char *b) _pure_;
+char* object_path_startswith(const char *a, const char *b) _pure_;
bool namespace_complex_pattern(const char *pattern, const char *value) _pure_;
bool path_complex_pattern(const char *pattern, const char *value) _pure_;
@@ -385,7 +385,7 @@ int bus_rqueue_make_room(sd_bus *bus);
bool bus_origin_changed(sd_bus *bus);
-char *bus_address_escape(const char *v);
+char* bus_address_escape(const char *v);
int bus_attach_io_events(sd_bus *b);
int bus_attach_inotify_event(sd_bus *b);
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c
index 606304d833..5434156ccd 100644
--- a/src/libsystemd/sd-bus/bus-match.c
+++ b/src/libsystemd/sd-bus/bus-match.c
@@ -823,7 +823,7 @@ int bus_match_parse(
return 0;
}
-char *bus_match_to_string(struct bus_match_component *components, size_t n_components) {
+char* bus_match_to_string(struct bus_match_component *components, size_t n_components) {
_cleanup_(memstream_done) MemStream m = {};
FILE *f;
int r;
diff --git a/src/libsystemd/sd-bus/bus-match.h b/src/libsystemd/sd-bus/bus-match.h
index ccb6aae58f..138123c70b 100644
--- a/src/libsystemd/sd-bus/bus-match.h
+++ b/src/libsystemd/sd-bus/bus-match.h
@@ -77,6 +77,6 @@ enum bus_match_node_type bus_match_node_type_from_string(const char *k, size_t n
int bus_match_parse(const char *match, struct bus_match_component **ret_components, size_t *ret_n_components);
void bus_match_parse_free(struct bus_match_component *components, size_t n_components);
-char *bus_match_to_string(struct bus_match_component *components, size_t n_components);
+char* bus_match_to_string(struct bus_match_component *components, size_t n_components);
enum bus_match_scope bus_match_get_scope(const struct bus_match_component *components, size_t n_components);
diff --git a/src/libsystemd/sd-journal/journal-internal.h b/src/libsystemd/sd-journal/journal-internal.h
index b95080c527..e96b88a0c9 100644
--- a/src/libsystemd/sd-journal/journal-internal.h
+++ b/src/libsystemd/sd-journal/journal-internal.h
@@ -136,7 +136,7 @@ struct sd_journal {
Hashmap *errors;
};
-char *journal_make_match_string(sd_journal *j);
+char* journal_make_match_string(sd_journal *j);
void journal_print_header(sd_journal *j);
int journal_get_directories(sd_journal *j, char ***ret);
diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
index 0aa37260b6..b08e3f923d 100644
--- a/src/libsystemd/sd-journal/sd-journal.c
+++ b/src/libsystemd/sd-journal/sd-journal.c
@@ -431,7 +431,7 @@ static char *match_make_string(Match *m) {
return TAKE_PTR(p);
}
-char *journal_make_match_string(sd_journal *j) {
+char* journal_make_match_string(sd_journal *j) {
assert(j);
return match_make_string(j->level0);
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 0a395c6509..380990c05d 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -282,7 +282,7 @@ static int seat_object_find(sd_bus *bus, const char *path, const char *interface
return 1;
}
-char *seat_bus_path(Seat *s) {
+char* seat_bus_path(Seat *s) {
_cleanup_free_ char *t = NULL;
assert(s);
diff --git a/src/login/logind-seat-dbus.h b/src/login/logind-seat-dbus.h
index 258db91d40..f4bd78e24b 100644
--- a/src/login/logind-seat-dbus.h
+++ b/src/login/logind-seat-dbus.h
@@ -8,7 +8,7 @@
extern const BusObjectImplementation seat_object;
-char *seat_bus_path(Seat *s);
+char* seat_bus_path(Seat *s);
int seat_send_signal(Seat *s, bool new_seat);
int seat_send_changed(Seat *s, const char *properties, ...) _sentinel_;
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 142cb214e2..ff4e60017d 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -713,7 +713,7 @@ static int session_object_find(sd_bus *bus, const char *path, const char *interf
return 1;
}
-char *session_bus_path(Session *s) {
+char* session_bus_path(Session *s) {
_cleanup_free_ char *t = NULL;
assert(s);
diff --git a/src/login/logind-session-dbus.h b/src/login/logind-session-dbus.h
index a026562938..37a107ec33 100644
--- a/src/login/logind-session-dbus.h
+++ b/src/login/logind-session-dbus.h
@@ -8,7 +8,7 @@
extern const BusObjectImplementation session_object;
-char *session_bus_path(Session *s);
+char* session_bus_path(Session *s);
int session_send_signal(Session *s, bool new_session);
int session_send_changed(Session *s, const char *properties, ...) _sentinel_;
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c
index ba83dc5d1a..a211953932 100644
--- a/src/login/logind-user-dbus.c
+++ b/src/login/logind-user-dbus.c
@@ -289,7 +289,7 @@ static int user_object_find(sd_bus *bus, const char *path, const char *interface
return 1;
}
-char *user_bus_path(User *u) {
+char* user_bus_path(User *u) {
char *s;
assert(u);
diff --git a/src/login/logind-user-dbus.h b/src/login/logind-user-dbus.h
index d2f24ced63..ba530bede2 100644
--- a/src/login/logind-user-dbus.h
+++ b/src/login/logind-user-dbus.h
@@ -7,7 +7,7 @@
extern const BusObjectImplementation user_object;
-char *user_bus_path(User *s);
+char* user_bus_path(User *s);
int user_send_signal(User *u, bool new_user);
int user_send_changed(User *u, const char *properties, ...) _sentinel_;
diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c
index d8068cdfcd..78c05ff502 100644
--- a/src/machine/image-dbus.c
+++ b/src/machine/image-dbus.c
@@ -461,7 +461,7 @@ static int image_object_find(sd_bus *bus, const char *path, const char *interfac
return 1;
}
-char *image_bus_path(const char *name) {
+char* image_bus_path(const char *name) {
_cleanup_free_ char *e = NULL;
assert(name);
diff --git a/src/machine/image-dbus.h b/src/machine/image-dbus.h
index 0c4fab1b0a..c0d56b2eb4 100644
--- a/src/machine/image-dbus.h
+++ b/src/machine/image-dbus.h
@@ -8,7 +8,7 @@
extern const BusObjectImplementation image_object;
int manager_acquire_image(Manager *m, const char *name, Image **ret);
-char *image_bus_path(const char *name);
+char* image_bus_path(const char *name);
int bus_image_method_remove(sd_bus_message *message, void *userdata, sd_bus_error *error);
int bus_image_method_rename(sd_bus_message *message, void *userdata, sd_bus_error *error);
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 544f820f55..86bd557b21 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -1231,7 +1231,7 @@ static int machine_object_find(sd_bus *bus, const char *path, const char *interf
return 1;
}
-char *machine_bus_path(Machine *m) {
+char* machine_bus_path(Machine *m) {
_cleanup_free_ char *e = NULL;
assert(m);
diff --git a/src/machine/machine-dbus.h b/src/machine/machine-dbus.h
index fccad71d12..fc9ec68087 100644
--- a/src/machine/machine-dbus.h
+++ b/src/machine/machine-dbus.h
@@ -13,7 +13,7 @@ typedef enum {
extern const BusObjectImplementation machine_object;
-char *machine_bus_path(Machine *s);
+char* machine_bus_path(Machine *s);
int bus_machine_method_unregister(sd_bus_message *message, void *userdata, sd_bus_error *error);
int bus_machine_method_terminate(sd_bus_message *message, void *userdata, sd_bus_error *error);
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index f5b8dc726b..84ed42987c 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/network/networkd-link-bus.c
@@ -802,7 +802,7 @@ static const sd_bus_vtable link_vtable[] = {
SD_BUS_VTABLE_END
};
-char *link_bus_path(Link *link) {
+char* link_bus_path(Link *link) {
_cleanup_free_ char *ifindex = NULL;
char *p;
int r;
diff --git a/src/network/networkd-link-bus.h b/src/network/networkd-link-bus.h
index 924d9976b5..bb12db92ee 100644
--- a/src/network/networkd-link-bus.h
+++ b/src/network/networkd-link-bus.h
@@ -10,7 +10,7 @@ typedef struct Link Link;
extern const BusObjectImplementation link_object;
-char *link_bus_path(Link *link);
+char* link_bus_path(Link *link);
int link_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error);
int link_object_find(sd_bus *bus, const char *path, const char *interface, void *userdata, void **found, sd_bus_error *error);
int link_send_changed_strv(Link *link, char **properties);
diff --git a/src/resolve/resolved-link-bus.c b/src/resolve/resolved-link-bus.c
index 656bdd9d8e..f5a3b0e36b 100644
--- a/src/resolve/resolved-link-bus.c
+++ b/src/resolve/resolved-link-bus.c
@@ -800,7 +800,7 @@ static int link_object_find(sd_bus *bus, const char *path, const char *interface
return 1;
}
-char *link_bus_path(const Link *link) {
+char* link_bus_path(const Link *link) {
char *p, ifindex[DECIMAL_STR_MAX(link->ifindex)];
int r;
diff --git a/src/resolve/resolved-link-bus.h b/src/resolve/resolved-link-bus.h
index b882df5c40..a450c51e56 100644
--- a/src/resolve/resolved-link-bus.h
+++ b/src/resolve/resolved-link-bus.h
@@ -8,7 +8,7 @@
extern const BusObjectImplementation link_object;
-char *link_bus_path(const Link *link);
+char* link_bus_path(const Link *link);
int bus_link_method_set_dns_servers(sd_bus_message *message, void *userdata, sd_bus_error *error);
int bus_link_method_set_dns_servers_ex(sd_bus_message *message, void *userdata, sd_bus_error *error);
diff --git a/src/shared/cpu-set-util.c b/src/shared/cpu-set-util.c
index 1112de1333..711e94ef45 100644
--- a/src/shared/cpu-set-util.c
+++ b/src/shared/cpu-set-util.c
@@ -40,7 +40,7 @@ char* cpu_set_to_string(const CPUSet *a) {
return TAKE_PTR(str) ?: strdup("");
}
-char *cpu_set_to_range_string(const CPUSet *set) {
+char* cpu_set_to_range_string(const CPUSet *set) {
unsigned range_start = 0, range_end;
_cleanup_free_ char *str = NULL;
bool in_range = false;
diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h
index 618fe1b0a3..2c477d8a01 100644
--- a/src/shared/cpu-set-util.h
+++ b/src/shared/cpu-set-util.h
@@ -26,7 +26,7 @@ int cpu_set_add_all(CPUSet *a, const CPUSet *b);
int cpu_set_add(CPUSet *a, unsigned cpu);
char* cpu_set_to_string(const CPUSet *a);
-char *cpu_set_to_range_string(const CPUSet *a);
+char* cpu_set_to_range_string(const CPUSet *a);
char* cpu_set_to_mask_string(const CPUSet *a);
int cpu_set_realloc(CPUSet *cpu_set, unsigned ncpus);
diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index 60ceff50e5..d6a256c4a7 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -346,7 +346,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
return strjoin("/dev/disk/by-", by, "/", t);
}
-char *fstab_node_to_udev_node(const char *p) {
+char* fstab_node_to_udev_node(const char *p) {
const char *q;
assert(p);
diff --git a/src/shared/fstab-util.h b/src/shared/fstab-util.h
index 040f07670f..42ecafbdb8 100644
--- a/src/shared/fstab-util.h
+++ b/src/shared/fstab-util.h
@@ -49,7 +49,7 @@ static inline bool fstab_test_yes_no_option(const char *opts, const char *yes_no
}
int fstab_find_pri(const char *opts, int *ret);
-char *fstab_node_to_udev_node(const char *p);
+char* fstab_node_to_udev_node(const char *p);
static inline const char* fstab_path(void) {
return secure_getenv("SYSTEMD_FSTAB") ?: "/etc/fstab";
diff --git a/src/shared/pkcs11-util.c b/src/shared/pkcs11-util.c
index d8408dae04..2775fa9268 100644
--- a/src/shared/pkcs11-util.c
+++ b/src/shared/pkcs11-util.c
@@ -201,7 +201,7 @@ CK_RV pkcs11_get_slot_list_malloc(
return CKR_BUFFER_TOO_SMALL;
}
-char *pkcs11_token_label(const CK_TOKEN_INFO *token_info) {
+char* pkcs11_token_label(const CK_TOKEN_INFO *token_info) {
char *t;
/* The label is not NUL terminated and likely padded with spaces, let's make a copy here, so that we
@@ -214,7 +214,7 @@ char *pkcs11_token_label(const CK_TOKEN_INFO *token_info) {
return t;
}
-char *pkcs11_token_manufacturer_id(const CK_TOKEN_INFO *token_info) {
+char* pkcs11_token_manufacturer_id(const CK_TOKEN_INFO *token_info) {
char *t;
t = strndup((char*) token_info->manufacturerID, sizeof(token_info->manufacturerID));
@@ -225,7 +225,7 @@ char *pkcs11_token_manufacturer_id(const CK_TOKEN_INFO *token_info) {
return t;
}
-char *pkcs11_token_model(const CK_TOKEN_INFO *token_info) {
+char* pkcs11_token_model(const CK_TOKEN_INFO *token_info) {
char *t;
t = strndup((char*) token_info->model, sizeof(token_info->model));
diff --git a/src/shared/pkcs11-util.h b/src/shared/pkcs11-util.h
index 30b9ac6864..000a127c97 100644
--- a/src/shared/pkcs11-util.h
+++ b/src/shared/pkcs11-util.h
@@ -48,9 +48,9 @@ DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(CK_FUNCTION_LIST**, sym_p11_kit_modules_finaliz
CK_RV pkcs11_get_slot_list_malloc(CK_FUNCTION_LIST *m, CK_SLOT_ID **ret_slotids, CK_ULONG *ret_n_slotids);
-char *pkcs11_token_label(const CK_TOKEN_INFO *token_info);
-char *pkcs11_token_manufacturer_id(const CK_TOKEN_INFO *token_info);
-char *pkcs11_token_model(const CK_TOKEN_INFO *token_info);
+char* pkcs11_token_label(const CK_TOKEN_INFO *token_info);
+char* pkcs11_token_manufacturer_id(const CK_TOKEN_INFO *token_info);
+char* pkcs11_token_model(const CK_TOKEN_INFO *token_info);
int pkcs11_token_login_by_pin(CK_FUNCTION_LIST *m, CK_SESSION_HANDLE session, const CK_TOKEN_INFO *token_info, const char *token_label, const void *pin, size_t pin_size);
int pkcs11_token_login(CK_FUNCTION_LIST *m, CK_SESSION_HANDLE session, CK_SLOT_ID slotid, const CK_TOKEN_INFO *token_info, const char *friendly_name, const char *icon_name, const char *key_name, const char *credential_name, usec_t until, AskPasswordFlags ask_password_flags, char **ret_used_pin);
diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
index d51e380f80..c4a35a9667 100644
--- a/src/shared/tpm2-util.c
+++ b/src/shared/tpm2-util.c
@@ -1458,7 +1458,7 @@ void tpm2_tpms_pcr_selection_move(TPMS_PCR_SELECTION *a, TPMS_PCR_SELECTION *b)
FOREACH_TPMS_PCR_SELECTION_IN_TPML_PCR_SELECTION(tpms, tpml) \
FOREACH_PCR_IN_TPMS_PCR_SELECTION(pcr, tpms)
-char *tpm2_tpms_pcr_selection_to_string(const TPMS_PCR_SELECTION *s) {
+char* tpm2_tpms_pcr_selection_to_string(const TPMS_PCR_SELECTION *s) {
assert(s);
const char *algstr = strna(tpm2_hash_alg_to_string(s->hash));
@@ -1648,7 +1648,7 @@ void tpm2_tpml_pcr_selection_sub(TPML_PCR_SELECTION *a, const TPML_PCR_SELECTION
tpm2_tpml_pcr_selection_sub_tpms_pcr_selection(a, selection_b);
}
-char *tpm2_tpml_pcr_selection_to_string(const TPML_PCR_SELECTION *l) {
+char* tpm2_tpml_pcr_selection_to_string(const TPML_PCR_SELECTION *l) {
assert(l);
_cleanup_free_ char *banks = NULL;
@@ -1942,7 +1942,7 @@ int tpm2_pcr_value_from_string(const char *arg, Tpm2PCRValue *ret_pcr_value) {
/* Return a string for the PCR value. The format is described in tpm2_pcr_value_from_string(). Note that if
* the hash algorithm is not recognized, neither hash name nor hash digest value is included in the
* string. This does not check for validity. */
-char *tpm2_pcr_value_to_string(const Tpm2PCRValue *pcr_value) {
+char* tpm2_pcr_value_to_string(const Tpm2PCRValue *pcr_value) {
_cleanup_free_ char *index = NULL, *value = NULL;
if (asprintf(&index, "%u", pcr_value->index) < 0)
@@ -1999,7 +1999,7 @@ int tpm2_pcr_values_from_string(const char *arg, Tpm2PCRValue **ret_pcr_values,
/* Return a string representing the array of PCR values. The format is as described in
* tpm2_pcr_values_from_string(). This does not check for validity. */
-char *tpm2_pcr_values_to_string(const Tpm2PCRValue *pcr_values, size_t n_pcr_values) {
+char* tpm2_pcr_values_to_string(const Tpm2PCRValue *pcr_values, size_t n_pcr_values) {
_cleanup_free_ char *s = NULL;
FOREACH_ARRAY(v, pcr_values, n_pcr_values) {
@@ -7277,7 +7277,7 @@ int tpm2_hmac_key_from_pin(Tpm2Context *c, const Tpm2Handle *session, const TPM2
}
#endif
-char *tpm2_pcr_mask_to_string(uint32_t mask) {
+char* tpm2_pcr_mask_to_string(uint32_t mask) {
_cleanup_free_ char *s = NULL;
FOREACH_PCR_IN_MASK(n, mask)
diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h
index da1ef9e20c..3a8565bac5 100644
--- a/src/shared/tpm2-util.h
+++ b/src/shared/tpm2-util.h
@@ -110,14 +110,14 @@ bool tpm2_pcr_value_valid(const Tpm2PCRValue *pcr_value);
bool tpm2_pcr_values_has_any_values(const Tpm2PCRValue *pcr_values, size_t n_pcr_values);
bool tpm2_pcr_values_has_all_values(const Tpm2PCRValue *pcr_values, size_t n_pcr_values);
int tpm2_pcr_value_from_string(const char *arg, Tpm2PCRValue *ret_pcr_value);
-char *tpm2_pcr_value_to_string(const Tpm2PCRValue *pcr_value);
+char* tpm2_pcr_value_to_string(const Tpm2PCRValue *pcr_value);
bool tpm2_pcr_values_valid(const Tpm2PCRValue *pcr_values, size_t n_pcr_values);
void tpm2_sort_pcr_values(Tpm2PCRValue *pcr_values, size_t n_pcr_values);
int tpm2_pcr_values_from_mask(uint32_t mask, TPMI_ALG_HASH hash, Tpm2PCRValue **ret_pcr_values, size_t *ret_n_pcr_values);
int tpm2_pcr_values_to_mask(const Tpm2PCRValue *pcr_values, size_t n_pcr_values, TPMI_ALG_HASH hash, uint32_t *ret_mask);
int tpm2_pcr_values_from_string(const char *arg, Tpm2PCRValue **ret_pcr_values, size_t *ret_n_pcr_values);
-char *tpm2_pcr_values_to_string(const Tpm2PCRValue *pcr_values, size_t n_pcr_values);
+char* tpm2_pcr_values_to_string(const Tpm2PCRValue *pcr_values, size_t n_pcr_values);
int tpm2_pcr_values_hash_count(const Tpm2PCRValue *pcr_values, size_t n_pcr_values, size_t *ret_count);
int tpm2_tpml_pcr_selection_from_pcr_values(const Tpm2PCRValue *pcr_values, size_t n_pcr_values, TPML_PCR_SELECTION *ret_selection, TPM2B_DIGEST **ret_values, size_t *ret_n_values);
@@ -169,7 +169,7 @@ void tpm2_tpms_pcr_selection_sub_mask(TPMS_PCR_SELECTION *s, uint32_t mask);
void tpm2_tpms_pcr_selection_add(TPMS_PCR_SELECTION *a, const TPMS_PCR_SELECTION *b);
void tpm2_tpms_pcr_selection_sub(TPMS_PCR_SELECTION *a, const TPMS_PCR_SELECTION *b);
void tpm2_tpms_pcr_selection_move(TPMS_PCR_SELECTION *a, TPMS_PCR_SELECTION *b);
-char *tpm2_tpms_pcr_selection_to_string(const TPMS_PCR_SELECTION *s);
+char* tpm2_tpms_pcr_selection_to_string(const TPMS_PCR_SELECTION *s);
size_t tpm2_tpms_pcr_selection_weight(const TPMS_PCR_SELECTION *s);
#define tpm2_tpms_pcr_selection_is_empty(s) (tpm2_tpms_pcr_selection_weight(s) == 0)
@@ -182,7 +182,7 @@ void tpm2_tpml_pcr_selection_add_tpms_pcr_selection(TPML_PCR_SELECTION *l, const
void tpm2_tpml_pcr_selection_sub_tpms_pcr_selection(TPML_PCR_SELECTION *l, const TPMS_PCR_SELECTION *s);
void tpm2_tpml_pcr_selection_add(TPML_PCR_SELECTION *a, const TPML_PCR_SELECTION *b);
void tpm2_tpml_pcr_selection_sub(TPML_PCR_SELECTION *a, const TPML_PCR_SELECTION *b);
-char *tpm2_tpml_pcr_selection_to_string(const TPML_PCR_SELECTION *l);
+char* tpm2_tpml_pcr_selection_to_string(const TPML_PCR_SELECTION *l);
size_t tpm2_tpml_pcr_selection_weight(const TPML_PCR_SELECTION *l);
#define tpm2_tpml_pcr_selection_is_empty(l) (tpm2_tpml_pcr_selection_weight(l) == 0)
@@ -438,7 +438,7 @@ int tpm2_sym_alg_from_string(const char *alg) _pure_;
const char* tpm2_sym_mode_to_string(uint16_t mode) _const_;
int tpm2_sym_mode_from_string(const char *mode) _pure_;
-char *tpm2_pcr_mask_to_string(uint32_t mask);
+char* tpm2_pcr_mask_to_string(uint32_t mask);
extern const uint16_t tpm2_hash_algorithms[];
diff --git a/src/systemd/sd-id128.h b/src/systemd/sd-id128.h
index a9210526b6..7573991c20 100644
--- a/src/systemd/sd-id128.h
+++ b/src/systemd/sd-id128.h
@@ -37,8 +37,8 @@ union sd_id128 {
#define SD_ID128_STRING_MAX 33U
#define SD_ID128_UUID_STRING_MAX 37U
-char *sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]);
-char *sd_id128_to_uuid_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_UUID_STRING_MAX]);
+char* sd_id128_to_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_STRING_MAX]);
+char* sd_id128_to_uuid_string(sd_id128_t id, char s[_SD_ARRAY_STATIC SD_ID128_UUID_STRING_MAX]);
int sd_id128_from_string(const char *s, sd_id128_t *ret);
#define SD_ID128_TO_STRING(id) sd_id128_to_string((id), (char[SD_ID128_STRING_MAX]) {})
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c
index 480d1009c3..f008556749 100644
--- a/src/xdg-autostart-generator/xdg-autostart-service.c
+++ b/src/xdg-autostart-generator/xdg-autostart-service.c
@@ -45,7 +45,7 @@ XdgAutostartService* xdg_autostart_service_free(XdgAutostartService *s) {
return mfree(s);
}
-char *xdg_autostart_service_translate_name(const char *name) {
+char* xdg_autostart_service_translate_name(const char *name) {
_cleanup_free_ char *c = NULL, *escaped = NULL;
char *res;
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.h b/src/xdg-autostart-generator/xdg-autostart-service.h
index 61a4a7304d..15a29da1be 100644
--- a/src/xdg-autostart-generator/xdg-autostart-service.h
+++ b/src/xdg-autostart-generator/xdg-autostart-service.h
@@ -29,7 +29,7 @@ typedef struct XdgAutostartService {
XdgAutostartService * xdg_autostart_service_free(XdgAutostartService *s);
DEFINE_TRIVIAL_CLEANUP_FUNC(XdgAutostartService*, xdg_autostart_service_free);
-char *xdg_autostart_service_translate_name(const char *name);
+char* xdg_autostart_service_translate_name(const char *name);
int xdg_autostart_format_exec_start(const char *exec, char **ret_exec_start);
XdgAutostartService *xdg_autostart_service_parse_desktop(const char *path);