From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCZnS-0001rk-Op for qemu-devel@nongnu.org; Fri, 14 Sep 2012 13:35:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCZnR-0002pt-Bm for qemu-devel@nongnu.org; Fri, 14 Sep 2012 13:35:18 -0400 Received: from david.siemens.de ([192.35.17.14]:16578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCZnQ-0002mB-S9 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 13:35:17 -0400 Message-ID: <50536AC8.7040801@siemens.com> Date: Fri, 14 Sep 2012 19:35:04 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] slirp: Remove unused return value of tftp_send_next_block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: =?ISO-8859-1?Q?Herv=E9_Poussineau?= , Aurelien Jarno No caller actually makes use of this value, so let's simplify the code. Signed-off-by: Jan Kiszka --- Applies on top of http://thread.gmane.org/gmane.comp.emulators.qemu/169909 slirp/tftp.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/slirp/tftp.c b/slirp/tftp.c index c6a5df2..cf7e3b8 100644 --- a/slirp/tftp.c +++ b/slirp/tftp.c @@ -197,8 +197,8 @@ out: tftp_session_terminate(spt); } -static int tftp_send_next_block(struct tftp_session *spt, - struct tftp_t *recv_tp) +static void tftp_send_next_block(struct tftp_session *spt, + struct tftp_t *recv_tp) { struct sockaddr_in saddr, daddr; struct mbuf *m; @@ -208,7 +208,7 @@ static int tftp_send_next_block(struct tftp_session *spt, m = m_get(spt->slirp); if (!m) { - return -1; + return; } memset(m->m_data, 0, m->m_size); @@ -235,7 +235,7 @@ static int tftp_send_next_block(struct tftp_session *spt, tftp_send_error(spt, 1, "File not found", tp); - return -1; + return; } m->m_len = sizeof(struct tftp_t) - (512 - nobytes) - @@ -251,7 +251,6 @@ static int tftp_send_next_block(struct tftp_session *spt, } spt->block_nr++; - return 0; } static void tftp_handle_rrq(Slirp *slirp, struct tftp_t *tp, int pktlen) @@ -383,10 +382,7 @@ static void tftp_handle_ack(Slirp *slirp, struct tftp_t *tp, int pktlen) return; } - if (tftp_send_next_block(&slirp->tftp_sessions[s], - tp) < 0) { - return; - } + tftp_send_next_block(&slirp->tftp_sessions[s], tp); } static void tftp_handle_error(Slirp *slirp, struct tftp_t *tp, int pktlen) -- 1.7.3.4