mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
Fri Feb 20 09:56:35 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: change the fix for the alignment warning a little.
This commit is contained in:
parent
28a07e4c80
commit
5ed716484e
@ -1,3 +1,8 @@
|
|||||||
|
Fri Feb 20 09:56:35 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
|
* qemud/bridge.c: change the fix for the alignment warning
|
||||||
|
a little.
|
||||||
|
|
||||||
Fri Feb 20 09:03:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
Fri Feb 20 09:03:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
|
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
|
||||||
|
@ -349,8 +349,8 @@ brSetInetAddr(brControl *ctl,
|
|||||||
else if (ret == 0)
|
else if (ret == 0)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
((struct sockaddr_in *)((void *)&ifr.ifr_addr))->sin_family = AF_INET;
|
((struct sockaddr_in *)&ifr.ifr_data)->sin_family = AF_INET;
|
||||||
((struct sockaddr_in *)((void *)&ifr.ifr_addr))->sin_addr = inaddr;
|
((struct sockaddr_in *)&ifr.ifr_data)->sin_addr = inaddr;
|
||||||
|
|
||||||
if (ioctl(ctl->fd, cmd, &ifr) < 0)
|
if (ioctl(ctl->fd, cmd, &ifr) < 0)
|
||||||
return errno;
|
return errno;
|
||||||
@ -386,7 +386,7 @@ brGetInetAddr(brControl *ctl,
|
|||||||
if (maxlen < BR_INET_ADDR_MAXLEN || ifr.ifr_addr.sa_family != AF_INET)
|
if (maxlen < BR_INET_ADDR_MAXLEN || ifr.ifr_addr.sa_family != AF_INET)
|
||||||
return EFAULT;
|
return EFAULT;
|
||||||
|
|
||||||
inaddr = &((struct sockaddr_in *)((void *)&ifr.ifr_addr))->sin_addr;
|
inaddr = &((struct sockaddr_in *)&ifr.ifr_data)->sin_addr;
|
||||||
|
|
||||||
if (!inet_ntop(AF_INET, inaddr, addr, maxlen))
|
if (!inet_ntop(AF_INET, inaddr, addr, maxlen))
|
||||||
return errno;
|
return errno;
|
||||||
|
Loading…
Reference in New Issue
Block a user