mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
nbd: inline tcp_socket_incoming_spec into sole caller
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
77e8b9ca64
commit
c06b72781d
2 changed files with 2 additions and 7 deletions
8
nbd.c
8
nbd.c
|
@ -202,13 +202,9 @@ static void combine_addr(char *buf, size_t len, const char* address,
|
|||
int tcp_socket_incoming(const char *address, uint16_t port)
|
||||
{
|
||||
char address_and_port[128];
|
||||
combine_addr(address_and_port, 128, address, port);
|
||||
return tcp_socket_incoming_spec(address_and_port);
|
||||
}
|
||||
|
||||
int tcp_socket_incoming_spec(const char *address_and_port)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
|
||||
combine_addr(address_and_port, 128, address, port);
|
||||
int fd = inet_listen(address_and_port, NULL, 0, SOCK_STREAM, 0, &local_err);
|
||||
|
||||
if (local_err != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue