提交 684a7a74 编写于 作者: A Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

...@@ -168,7 +168,7 @@ check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) ...@@ -168,7 +168,7 @@ check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y)
test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y)
$(qapi-obj-y): $(GENERATED_HEADERS) $(qapi-obj-y): $(GENERATED_HEADERS)
qapi-dir := qapi-generated qapi-dir := $(SRC_PATH)/qapi-generated
test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir) test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
......
...@@ -1971,7 +1971,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) ...@@ -1971,7 +1971,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s)
cplus_tx_ring_desc += 16 * descriptor; cplus_tx_ring_desc += 16 * descriptor;
DPRINTF("+++ C+ mode reading TX descriptor %d from host memory at " DPRINTF("+++ C+ mode reading TX descriptor %d from host memory at "
"%08x0x%08x = 0x"DMA_ADDR_FMT"\n", descriptor, s->TxAddr[1], "%08x %08x = 0x"DMA_ADDR_FMT"\n", descriptor, s->TxAddr[1],
s->TxAddr[0], cplus_tx_ring_desc); s->TxAddr[0], cplus_tx_ring_desc);
uint32_t val, txdw0,txdw1,txbufLO,txbufHI; uint32_t val, txdw0,txdw1,txbufLO,txbufHI;
...@@ -2713,8 +2713,6 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val) ...@@ -2713,8 +2713,6 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val)
{ {
RTL8139State *s = opaque; RTL8139State *s = opaque;
addr &= 0xff;
switch (addr) switch (addr)
{ {
case MAC0 ... MAC0+5: case MAC0 ... MAC0+5:
...@@ -2800,8 +2798,6 @@ static void rtl8139_io_writew(void *opaque, uint8_t addr, uint32_t val) ...@@ -2800,8 +2798,6 @@ static void rtl8139_io_writew(void *opaque, uint8_t addr, uint32_t val)
{ {
RTL8139State *s = opaque; RTL8139State *s = opaque;
addr &= 0xfe;
switch (addr) switch (addr)
{ {
case IntrMask: case IntrMask:
...@@ -2900,8 +2896,6 @@ static void rtl8139_io_writel(void *opaque, uint8_t addr, uint32_t val) ...@@ -2900,8 +2896,6 @@ static void rtl8139_io_writel(void *opaque, uint8_t addr, uint32_t val)
{ {
RTL8139State *s = opaque; RTL8139State *s = opaque;
addr &= 0xfc;
switch (addr) switch (addr)
{ {
case RxMissed: case RxMissed:
...@@ -2969,8 +2963,6 @@ static uint32_t rtl8139_io_readb(void *opaque, uint8_t addr) ...@@ -2969,8 +2963,6 @@ static uint32_t rtl8139_io_readb(void *opaque, uint8_t addr)
RTL8139State *s = opaque; RTL8139State *s = opaque;
int ret; int ret;
addr &= 0xff;
switch (addr) switch (addr)
{ {
case MAC0 ... MAC0+5: case MAC0 ... MAC0+5:
...@@ -3043,8 +3035,6 @@ static uint32_t rtl8139_io_readw(void *opaque, uint8_t addr) ...@@ -3043,8 +3035,6 @@ static uint32_t rtl8139_io_readw(void *opaque, uint8_t addr)
RTL8139State *s = opaque; RTL8139State *s = opaque;
uint32_t ret; uint32_t ret;
addr &= 0xfe; /* mask lower bit */
switch (addr) switch (addr)
{ {
case IntrMask: case IntrMask:
...@@ -3120,8 +3110,6 @@ static uint32_t rtl8139_io_readl(void *opaque, uint8_t addr) ...@@ -3120,8 +3110,6 @@ static uint32_t rtl8139_io_readl(void *opaque, uint8_t addr)
RTL8139State *s = opaque; RTL8139State *s = opaque;
uint32_t ret; uint32_t ret;
addr &= 0xfc; /* also mask low 2 bits */
switch (addr) switch (addr)
{ {
case RxMissed: case RxMissed:
......
...@@ -305,7 +305,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) ...@@ -305,7 +305,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
{ {
struct in_addr host_addr = { .s_addr = INADDR_ANY }; struct in_addr host_addr = { .s_addr = INADDR_ANY };
int host_port; int host_port;
char buf[256] = ""; char buf[256];
const char *src_str, *p; const char *src_str, *p;
SlirpState *s; SlirpState *s;
int is_udp = 0; int is_udp = 0;
...@@ -325,11 +325,10 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) ...@@ -325,11 +325,10 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
return; return;
} }
if (!src_str || !src_str[0])
goto fail_syntax;
p = src_str; p = src_str;
get_str_sep(buf, sizeof(buf), &p, ':'); if (!p || get_str_sep(buf, sizeof(buf), &p, ':') < 0) {
goto fail_syntax;
}
if (!strcmp(buf, "tcp") || buf[0] == '\0') { if (!strcmp(buf, "tcp") || buf[0] == '\0') {
is_udp = 0; is_udp = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册