lib: reserve 'result' for CURLcode, even more

Closes #21245
This commit is contained in:
Daniel Stenberg 2026-04-06 23:27:36 +02:00
parent fc3261b284
commit be92f0a2e4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 76 additions and 79 deletions

View file

@ -485,7 +485,7 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
const char *line, size_t len, int *resp)
{
struct smtp_conn *smtpc = Curl_conn_meta_get(conn, CURL_META_SMTP_CONN);
bool result = FALSE;
bool end = FALSE;
(void)data;
DEBUGASSERT(smtpc);
@ -504,7 +504,7 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
char tmpline[6];
curl_off_t code;
const char *p = tmpline;
result = TRUE;
end = TRUE;
memcpy(tmpline, line, (len == 5 ? 5 : 3));
tmpline[len == 5 ? 5 : 3] = 0;
if(curlx_str_number(&p, &code, len == 5 ? 99999 : 999))
@ -518,11 +518,11 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
/* Do we have a multiline (continuation) response? */
else if(line[3] == '-' &&
(smtpc->state == SMTP_EHLO || smtpc->state == SMTP_COMMAND)) {
result = TRUE;
end = TRUE;
*resp = 1; /* Internal response code */
}
return result;
return end;
}
/***********************************************************************