Commit d6cf84e1de0a167963f0803d6e39f6ca03e27eaa
Committed by
Anthony Liguori
1 parent
d918f23e
slirp: Drop redundant checks from slirp_output
Slirp doesn't invoke slirp[_can]_output before it is initialized. The motivation for these checks (3b7f5d47) no longer applies. So drop them. Note: slirp_vc will become invalid if the slirp stack is removed during runtime. But this is no new bug and will be fixed later. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
1 additions
and
3 deletions
net.c
... | ... | @@ -696,7 +696,7 @@ static void slirp_smb(const char *exported_dir, struct in_addr vserver_addr); |
696 | 696 | |
697 | 697 | int slirp_can_output(void) |
698 | 698 | { |
699 | - return !slirp_vc || qemu_can_send_packet(slirp_vc); | |
699 | + return qemu_can_send_packet(slirp_vc); | |
700 | 700 | } |
701 | 701 | |
702 | 702 | void slirp_output(const uint8_t *pkt, int pkt_len) |
... | ... | @@ -705,8 +705,6 @@ void slirp_output(const uint8_t *pkt, int pkt_len) |
705 | 705 | printf("slirp output:\n"); |
706 | 706 | hex_dump(stdout, pkt, pkt_len); |
707 | 707 | #endif |
708 | - if (!slirp_vc) | |
709 | - return; | |
710 | 708 | qemu_send_packet(slirp_vc, pkt, pkt_len); |
711 | 709 | } |
712 | 710 | ... | ... |