use (s)size_t for string lengths to fix compiler warns
This commit is contained in:
@@ -990,9 +990,9 @@ CURLcode Curl_pop3_write(struct connectdata *conn,
|
|||||||
0d 0a 2e 0d 0a. This marker can of course be spread out
|
0d 0a 2e 0d 0a. This marker can of course be spread out
|
||||||
over up to 5 different data chunks. Deal with it! */
|
over up to 5 different data chunks. Deal with it! */
|
||||||
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
||||||
int checkmax = (nread >= POP3_EOB_LEN?POP3_EOB_LEN:nread);
|
size_t checkmax = (nread >= POP3_EOB_LEN?POP3_EOB_LEN:nread);
|
||||||
int checkleft = POP3_EOB_LEN-pop3c->eob;
|
size_t checkleft = POP3_EOB_LEN-pop3c->eob;
|
||||||
int check = (checkmax >= checkleft?checkleft:checkmax);
|
size_t check = (checkmax >= checkleft?checkleft:checkmax);
|
||||||
|
|
||||||
if(!memcmp(POP3_EOB, &str[nread - check], check)) {
|
if(!memcmp(POP3_EOB, &str[nread - check], check)) {
|
||||||
/* substring match */
|
/* substring match */
|
||||||
|
|||||||
@@ -1059,7 +1059,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
|
|||||||
/* This loop can be improved by some kind of Boyer-Moore style of
|
/* This loop can be improved by some kind of Boyer-Moore style of
|
||||||
approach but that is saved for later... */
|
approach but that is saved for later... */
|
||||||
for(i = 0, si = 0; i < nread; i++, si++) {
|
for(i = 0, si = 0; i < nread; i++, si++) {
|
||||||
int left = nread - i;
|
ssize_t left = nread - i;
|
||||||
|
|
||||||
if(left>= (SMTP_EOB_LEN-smtpc->eob)) {
|
if(left>= (SMTP_EOB_LEN-smtpc->eob)) {
|
||||||
if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
|
if(!memcmp(SMTP_EOB+smtpc->eob, &data->req.upload_fromhere[i],
|
||||||
|
|||||||
Reference in New Issue
Block a user