mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:53:46 +03:00
Created a CURLMIN macro to match CURLMAX
This commit is contained in:
parent
dd058b8de6
commit
80ffd3581f
4 changed files with 7 additions and 21 deletions
|
|
@ -323,10 +323,6 @@ static int data_pending(const struct connectdata *conn)
|
|||
Curl_ssl_data_pending(conn, FIRSTSOCKET);
|
||||
}
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (a < b ? a : b)
|
||||
#endif
|
||||
|
||||
static void read_rewind(struct connectdata *conn,
|
||||
size_t thismuch)
|
||||
{
|
||||
|
|
@ -338,7 +334,7 @@ static void read_rewind(struct connectdata *conn,
|
|||
char buf[512 + 1];
|
||||
size_t show;
|
||||
|
||||
show = MIN(conn->buf_len - conn->read_pos, sizeof(buf)-1);
|
||||
show = CURLMIN(conn->buf_len - conn->read_pos, sizeof(buf)-1);
|
||||
if(conn->master_buffer) {
|
||||
memcpy(buf, conn->master_buffer + conn->read_pos, show);
|
||||
buf[show] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue