From 6c1a7541fb144e95fb11ba26c0b341d4c68436fc Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Jun 2025 15:24:16 +0200 Subject: [PATCH] tftpd: use `CURLMIN()` macro Closes #17674 --- tests/server/tftpd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 8c3484b389..9fceac28d0 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -179,9 +179,6 @@ struct bf { #define TIMEOUT 5 -#undef MIN -#define MIN(x,y) ((x)<(y)?(x):(y)) - #define REQUEST_DUMP "server.input" /***************************************************************************** @@ -392,7 +389,7 @@ static void read_ahead(struct testcase *test, if(convert == 0) { /* The former file reading code did this: b->counter = read(fileno(file), dp->th_data, SEGSIZE); */ - size_t copy_n = MIN(SEGSIZE, test->rcount); + size_t copy_n = CURLMIN(SEGSIZE, test->rcount); memcpy(dp->th_data, test->rptr, copy_n); /* decrease amount, advance pointer */ -- 2.47.2