From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcCr-0004gX-5N for qemu-devel@nongnu.org; Fri, 14 Sep 2012 16:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCcCp-0002hm-Vb for qemu-devel@nongnu.org; Fri, 14 Sep 2012 16:09:41 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:54842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCcCp-0002fL-Bp for qemu-devel@nongnu.org; Fri, 14 Sep 2012 16:09:39 -0400 Message-ID: <50538EF3.7060100@reactos.org> Date: Fri, 14 Sep 2012 22:09:23 +0200 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 References: <50536AC8.7040801@siemens.com> In-Reply-To: <50536AC8.7040801@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Jan Kiszka Cc: qemu-devel , Aurelien Jarno Jan Kiszka a =E9crit : > No caller actually makes use of this value, so let's simplify the code. >=20 > Signed-off-by: Jan Kiszka Acked-by: Herv=E9 Poussineau > --- >=20 > Applies on top of http://thread.gmane.org/gmane.comp.emulators.qemu/169= 909 >=20 > slirp/tftp.c | 14 +++++--------- > 1 files changed, 5 insertions(+), 9 deletions(-) >=20 > 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); > } > =20 > -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 =3D m_get(spt->slirp); > =20 > if (!m) { > - return -1; > + return; > } > =20 > memset(m->m_data, 0, m->m_size); > @@ -235,7 +235,7 @@ static int tftp_send_next_block(struct tftp_session= *spt, > =20 > tftp_send_error(spt, 1, "File not found", tp); > =20 > - return -1; > + return; > } > =20 > m->m_len =3D sizeof(struct tftp_t) - (512 - nobytes) - > @@ -251,7 +251,6 @@ static int tftp_send_next_block(struct tftp_session= *spt, > } > =20 > spt->block_nr++; > - return 0; > } > =20 > static void tftp_handle_rrq(Slirp *slirp, struct tftp_t *tp, int pktle= n) > @@ -383,10 +382,7 @@ static void tftp_handle_ack(Slirp *slirp, struct t= ftp_t *tp, int pktlen) > return; > } > =20 > - if (tftp_send_next_block(&slirp->tftp_sessions[s], > - tp) < 0) { > - return; > - } > + tftp_send_next_block(&slirp->tftp_sessions[s], tp); > } > =20 > static void tftp_handle_error(Slirp *slirp, struct tftp_t *tp, int pkt= len)