net/socket: Convert several helper functions to Error
commitc37f0bb1d0d24e3a6b5f4659bb305913dcb798a6
authorMao Zhongyi <maozy.fnst@cn.fujitsu.com>
Mon, 4 Sep 2017 14:35:38 +0000 (4 22:35 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 8 Sep 2017 00:17:37 +0000 (8 08:17 +0800)
tree38e3fe1cc26ee50da485bf7c4fd460a364d799d4
parente1b24b649a8dbd941488402b719a81618980a3c0
net/socket: Convert several helper functions to Error

Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and
net_socket_fd_init() use the function such as fprintf(), perror() to
report an error message.

Now, convert these functions to Error.

Cc: jasowang@redhat.com
Cc: armbru@redhat.com
Cc: berrange@redhat.com
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/socket.c