]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virSocketSendMsgWithFDs: Don't report errors, just set errno
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Feb 2024 11:56:04 +0000 (12:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 7 Feb 2024 09:57:00 +0000 (10:57 +0100)
commite82f99283dd5d6553d482aef2464366342d1b6e6
tree34d2062bb0a8d256647f3956efc568ec4636146d
parentb051762e3e3968a1790d084264e46ddd4e56b9ec
virSocketSendMsgWithFDs: Don't report errors, just set errno

Currently, virSocketSendMsgWithFDs() reports two errors:

1) if CMSG_FIRSTHDR() fails,
2) if sendmsg() fails.

Well, the latter sets an errno, so caller can just use
virReportSystemError(). And the former - it is very unlikely to
fail because memory for whole control message was allocated just
a few lines above.

The motivation is to unify behavior of virSocketSendMsgWithFDs()
and virSocketSendFD() because the latter is just a subset of the
former (will be addressed later).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
po/POTFILES
src/ch/ch_process.c
src/util/virsocket.c