summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-24 12:19:29 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-24 12:19:29 -0500
commit336f925294bc50224a6c3a7d5779a741762ea52c (patch)
tree5f4d8add60d629d03ba2ce5994ed4f9de693ad40
parent1fd6a6310688e1dc04f59f174e69f4fa106a0b83 (diff)
Fix an inaccurate comment in sd-daemon.c
-rw-r--r--src/libsystemd/src/sd-daemon/sd-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/src/sd-daemon/sd-daemon.c b/src/libsystemd/src/sd-daemon/sd-daemon.c
index 1424d60a78..e272d91bfc 100644
--- a/src/libsystemd/src/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/src/sd-daemon/sd-daemon.c
@@ -463,7 +463,7 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
have_pid = pid != 0 && pid != getpid();
if (n_fds > 0 || have_pid) {
- /* CMSG_SPACE(0) may return value different than zero, which results in miscalculated controllen. */
+ /* CMSG_SPACE(0) returns a value greater than zero, hence the ternary on n_fds. */
msghdr.msg_controllen =
(n_fds > 0 ? CMSG_SPACE(sizeof(int) * n_fds) : 0) +
(have_pid ? CMSG_SPACE(sizeof(struct ucred)) : 0);