提交 5ed71648 编写于 作者: M Mark McLoughlin

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.
上级 28a07e4c
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>
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
......
......@@ -349,8 +349,8 @@ brSetInetAddr(brControl *ctl,
else if (ret == 0)
return EINVAL;
((struct sockaddr_in *)((void *)&ifr.ifr_addr))->sin_family = AF_INET;
((struct sockaddr_in *)((void *)&ifr.ifr_addr))->sin_addr = inaddr;
((struct sockaddr_in *)&ifr.ifr_data)->sin_family = AF_INET;
((struct sockaddr_in *)&ifr.ifr_data)->sin_addr = inaddr;
if (ioctl(ctl->fd, cmd, &ifr) < 0)
return errno;
......@@ -386,7 +386,7 @@ brGetInetAddr(brControl *ctl,
if (maxlen < BR_INET_ADDR_MAXLEN || ifr.ifr_addr.sa_family != AF_INET)
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))
return errno;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册