"</html>";
-/** Initialises the Webserver application, opening the appropriate HTTP port in the TCP handler and registering the application
+/** Initializes the Webserver application, opening the appropriate HTTP port in the TCP handler and registering the application
* callback routine for packets sent to the HTTP protocol port.
*/
void Webserver_Init(void)
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);