aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:06:18 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:06:18 +0000
commit1eec614b36390be66430ed6dd0ce47a6f2f0ae1a (patch)
treefa9174028d54ea9a531a77d05996688fc704fadd /net.c
parent0d0266a53b4c80ab08c093c36bb3a7bbb29cc3e5 (diff)
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'net.c')
-rw-r--r--net.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/net.c b/net.c
index 8d9b3de253..e7c097e1c8 100644
--- a/net.c
+++ b/net.c
@@ -333,8 +333,6 @@ VLANClientState *qemu_new_vlan_client(VLANState *vlan,
{
VLANClientState *vc, **pvc;
vc = qemu_mallocz(sizeof(VLANClientState));
- if (!vc)
- return NULL;
vc->model = strdup(model);
if (name)
vc->name = strdup(name);
@@ -728,8 +726,6 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
TAPState *s;
s = qemu_mallocz(sizeof(TAPState));
- if (!s)
- return NULL;
s->fd = fd;
s->vc = qemu_new_vlan_client(vlan, model, name, tap_receive, NULL, s);
#ifdef HAVE_IOVEC
@@ -1049,8 +1045,6 @@ static int net_vde_init(VLANState *vlan, const char *model,
};
s = qemu_mallocz(sizeof(VDEState));
- if (!s)
- return -1;
s->vde = vde_open(init_sock, "QEMU", &args);
if (!s->vde){
free(s);
@@ -1274,8 +1268,6 @@ static NetSocketState *net_socket_fd_init_dgram(VLANState *vlan,
}
s = qemu_mallocz(sizeof(NetSocketState));
- if (!s)
- return NULL;
s->fd = fd;
s->vc = qemu_new_vlan_client(vlan, model, name, net_socket_receive_dgram, NULL, s);
@@ -1304,8 +1296,6 @@ static NetSocketState *net_socket_fd_init_stream(VLANState *vlan,
{
NetSocketState *s;
s = qemu_mallocz(sizeof(NetSocketState));
- if (!s)
- return NULL;
s->fd = fd;
s->vc = qemu_new_vlan_client(vlan, model, name,
net_socket_receive, NULL, s);
@@ -1383,8 +1373,6 @@ static int net_socket_listen_init(VLANState *vlan,
return -1;
s = qemu_mallocz(sizeof(NetSocketListenState));
- if (!s)
- return -1;
fd = socket(PF_INET, SOCK_STREAM, 0);
if (fd < 0) {
@@ -1504,8 +1492,6 @@ VLANState *qemu_find_vlan(int id)
return vlan;
}
vlan = qemu_mallocz(sizeof(VLANState));
- if (!vlan)
- return NULL;
vlan->id = id;
vlan->next = NULL;
pvlan = &first_vlan;