tftpd: shut up one more setjmp complaint

One more place where the compiler complains about setjmp. Work around
it by creating yet another static variable. Ugly, but it works.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2024-05-29 17:35:14 -07:00
parent 351907e3f0
commit b9f2335e88

View file

@ -1660,17 +1660,21 @@ static void tftp_sendfile(const struct formats *pf, struct tftphdr *oap, int oac
/*
* Receive a file.
*/
static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oacklen)
static void tftp_recvfile(const struct formats *pf,
struct tftphdr *oack, int oacklen)
{
struct tftphdr *dp;
int n, size;
/* These are "static" to avoid longjmp funnies */
static struct tftphdr *oap;
static struct tftphdr *ap; /* ack buffer */
static u_short block = 0;
static int acksize;
u_short dp_opcode, dp_block;
unsigned long r_timeout;
oap = oack;
dp = w_init();
do {
timeout = rexmtval;