From 8f5ab27dc9b2a7c4944a5e7d149f39959ead477e Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 23 Mar 2011 09:26:41 +0000 Subject: Use the MIN() macro where possible instead of manual "(x < y) ? x : y" constructs. --- Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Demos/Device/LowLevel/RNDISEthernet/Lib') diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c index 1cc907862..019329e2b 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c @@ -181,7 +181,7 @@ void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState, uint16_t Length; /* Determine the length of the loaded block */ - Length = ((RemLength > HTTP_REPLY_BLOCK_SIZE) ? HTTP_REPLY_BLOCK_SIZE : RemLength); + Length = MIN(RemLength, HTTP_REPLY_BLOCK_SIZE); /* Copy the next buffer sized block of the page to the packet buffer */ strncpy_P(BufferDataStr, &HTTPPage[PageBlock * HTTP_REPLY_BLOCK_SIZE], Length); -- cgit v1.2.3