tree-wide: also use CMSG_TYPED_DATA() on writing message header

This commit is contained in:
Yu Watanabe
2023-04-16 13:26:58 +09:00
parent 1ebb0953f0
commit b5d39bb3ca
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -567,7 +567,7 @@ _public_ int sd_pid_notify_with_fds(
cmsg->cmsg_type = SCM_CREDENTIALS;
cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
ucred = (struct ucred*) CMSG_DATA(cmsg);
ucred = CMSG_TYPED_DATA(cmsg, struct ucred);
ucred->pid = pid != 0 ? pid : getpid_cached();
ucred->uid = getuid();
ucred->gid = getgid();