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:
Mark McLoughlin 2007-02-20 09:57:47 +00:00
parent 28a07e4c80
commit 5ed716484e
2 changed files with 8 additions and 3 deletions

View File

@ -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()

View File

@ -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;