aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-09-13 12:44:27 +0200
committerJan Kiszka <jan.kiszka@siemens.com>2012-09-13 12:44:27 +0200
commit1a2439ac64da6b78911ca9906a2a068b806b9f12 (patch)
treefa0836c53bfdad018608eb9469a32cab0585c2a1
parent65314b8cb367ade52c4722bb0683823c206ea714 (diff)
downloadslirp-1a2439ac64da6b78911ca9906a2a068b806b9f12.zip
slirp-1a2439ac64da6b78911ca9906a2a068b806b9f12.tar.gz
slirp-1a2439ac64da6b78911ca9906a2a068b806b9f12.tar.bz2
slirp: Remove unused return value of tftp_send_next_block
No caller actually makes use of this value, so let's simplify the code. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r--tftp.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tftp.c b/tftp.c
index 6e6aee8..69a4268 100644
--- a/tftp.c
+++ b/tftp.c
@@ -194,8 +194,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;
@@ -205,7 +205,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);
@@ -232,7 +232,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) - sizeof(struct ip) -
@@ -247,7 +247,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)
@@ -378,9 +377,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)