tree-wide: replace IOVEC_INIT with IOVEC_MAKE

We use gnu11 to build, hence we can use structured initializer with
casting, and it is not necessary to use different patterns on
initialization and assignment.

Addresses https://github.com/systemd/systemd/pull/26560#discussion_r1118875447.
This commit is contained in:
Yu Watanabe
2023-03-06 09:30:28 +09:00
parent a0229fb14d
commit ce16d177dd
5 changed files with 18 additions and 20 deletions
+3 -3
View File
@@ -3992,9 +3992,9 @@ static int send_user_lookup(
if (writev(user_lookup_fd,
(struct iovec[]) {
IOVEC_INIT(&uid, sizeof(uid)),
IOVEC_INIT(&gid, sizeof(gid)),
IOVEC_INIT_STRING(unit->id) }, 3) < 0)
IOVEC_MAKE(&uid, sizeof(uid)),
IOVEC_MAKE(&gid, sizeof(gid)),
IOVEC_MAKE_STRING(unit->id) }, 3) < 0)
return -errno;
return 0;