mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
lib: remove redundant code
Closes https://github.com/curl/curl/pull/6576
This commit is contained in:
parent
cc9c4e0f4e
commit
1cd823ed5a
@ -966,7 +966,6 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
else if(c == '\n') {
|
else if(c == '\n') {
|
||||||
parser->offsets.filename = parser->item_offset;
|
parser->offsets.filename = parser->item_offset;
|
||||||
finfo->b_data[finfo->b_used - 1] = 0;
|
finfo->b_data[finfo->b_used - 1] = 0;
|
||||||
parser->offsets.filename = parser->item_offset;
|
|
||||||
result = ftp_pl_insert_finfo(data, infop);
|
result = ftp_pl_insert_finfo(data, infop);
|
||||||
if(result) {
|
if(result) {
|
||||||
parser->error = result;
|
parser->error = result;
|
||||||
|
@ -91,15 +91,13 @@ static bool countcheck(const char *func, int line, const char *source)
|
|||||||
should not be made */
|
should not be made */
|
||||||
if(memlimit && source) {
|
if(memlimit && source) {
|
||||||
if(!memsize) {
|
if(!memsize) {
|
||||||
if(source) {
|
/* log to file */
|
||||||
/* log to file */
|
curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
|
||||||
curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
|
source, line, func);
|
||||||
source, line, func);
|
/* log to stderr also */
|
||||||
/* log to stderr also */
|
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
|
||||||
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
|
source, line, func);
|
||||||
source, line, func);
|
fflush(curl_dbg_logfile); /* because it might crash now */
|
||||||
fflush(curl_dbg_logfile); /* because it might crash now */
|
|
||||||
}
|
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return TRUE; /* RETURN ERROR! */
|
return TRUE; /* RETURN ERROR! */
|
||||||
}
|
}
|
||||||
|
@ -498,9 +498,7 @@ static CURLcode pausewrite(struct Curl_easy *data,
|
|||||||
/* store this information in the state struct for later use */
|
/* store this information in the state struct for later use */
|
||||||
Curl_dyn_init(&s->tempwrite[i].b, DYN_PAUSE_BUFFER);
|
Curl_dyn_init(&s->tempwrite[i].b, DYN_PAUSE_BUFFER);
|
||||||
s->tempwrite[i].type = type;
|
s->tempwrite[i].type = type;
|
||||||
|
s->tempcount++;
|
||||||
if(newtype)
|
|
||||||
s->tempcount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Curl_dyn_addn(&s->tempwrite[i].b, (unsigned char *)ptr, len))
|
if(Curl_dyn_addn(&s->tempwrite[i].b, (unsigned char *)ptr, len))
|
||||||
|
@ -231,12 +231,6 @@ static CURLcode tftp_set_timeouts(struct tftp_state_data *state)
|
|||||||
if(state->retry_max < 1)
|
if(state->retry_max < 1)
|
||||||
/* avoid division by zero below */
|
/* avoid division by zero below */
|
||||||
state->retry_max = 1;
|
state->retry_max = 1;
|
||||||
|
|
||||||
/* Compute the re-start interval to suit the timeout */
|
|
||||||
state->retry_time = (int)timeout/state->retry_max;
|
|
||||||
if(state->retry_time<1)
|
|
||||||
state->retry_time = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(timeout_ms > 0)
|
if(timeout_ms > 0)
|
||||||
|
@ -1788,7 +1788,6 @@ static CURLcode ng_flush_egress(struct Curl_easy *data,
|
|||||||
ngtcp2_path_storage_zero(&ps);
|
ngtcp2_path_storage_zero(&ps);
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
outlen = -1;
|
|
||||||
veccnt = 0;
|
veccnt = 0;
|
||||||
stream_id = -1;
|
stream_id = -1;
|
||||||
fin = 0;
|
fin = 0;
|
||||||
|
@ -700,7 +700,6 @@ static CURLcode gskit_connect_step1(struct Curl_easy *data,
|
|||||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||||
gsk_handle envir;
|
gsk_handle envir;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
int rc;
|
|
||||||
const char * const keyringfile = SSL_CONN_CONFIG(CAfile);
|
const char * const keyringfile = SSL_CONN_CONFIG(CAfile);
|
||||||
const char * const keyringpwd = SSL_SET_OPTION(key_passwd);
|
const char * const keyringpwd = SSL_SET_OPTION(key_passwd);
|
||||||
const char * const keyringlabel = SSL_SET_OPTION(primary.clientcert);
|
const char * const keyringlabel = SSL_SET_OPTION(primary.clientcert);
|
||||||
|
Loading…
Reference in New Issue
Block a user