diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-15 22:09:00 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-15 22:09:00 +0300 |
commit | d98105b91b7ef63adf56fe808c92657fea927c59 (patch) | |
tree | f8a505b4b277227796d48daad1c2d57393775bb0 /src/microhttpd/response.c | |
parent | c1115185b8c6f85bb51c6f0c20e8db69201a494b (diff) | |
download | libmicrohttpd-d98105b91b7ef63adf56fe808c92657fea927c59.tar.gz libmicrohttpd-d98105b91b7ef63adf56fe808c92657fea927c59.zip |
Fixed compiler warning
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index f4dc361c..a77dbe27 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -546,9 +546,17 @@ pipe_reader (void *cls, | |||
546 | ssize_t n; | 546 | ssize_t n; |
547 | 547 | ||
548 | (void) pos; | 548 | (void) pos; |
549 | #ifndef _WIN32 | ||
550 | if (SSIZE_MAX < max) | ||
551 | max = SSIZE_MAX; | ||
552 | #else /* _WIN32 */ | ||
553 | if (UINT_MAX < max) | ||
554 | max = UINT_MAX; | ||
555 | #endif /* _WIN32 */ | ||
556 | |||
549 | n = read (response->fd, | 557 | n = read (response->fd, |
550 | buf, | 558 | buf, |
551 | max); | 559 | (MHD_SCKT_SEND_SIZE_) max); |
552 | if (0 == n) | 560 | if (0 == n) |
553 | return MHD_CONTENT_READER_END_OF_STREAM; | 561 | return MHD_CONTENT_READER_END_OF_STREAM; |
554 | if (n < 0) | 562 | if (n < 0) |