mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
vmspawn: simplify cmdline_add_vsock() a tiny bit
This commit is contained in:
parent
89cecfb100
commit
fab0f6e0fc
@ -926,9 +926,9 @@ static int cmdline_add_vsock(char ***cmdline, int vsock_fd) {
|
||||
|
||||
union sockaddr_union addr;
|
||||
socklen_t addr_len = sizeof addr.vm;
|
||||
r = getsockname(vsock_fd, &addr.sa, &addr_len);
|
||||
if (r < 0)
|
||||
if (getsockname(vsock_fd, &addr.sa, &addr_len) < 0)
|
||||
return -errno;
|
||||
|
||||
assert(addr_len >= sizeof addr.vm);
|
||||
assert(addr.vm.svm_family == AF_VSOCK);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user