mirror of
https://github.com/curl/curl.git
synced 2026-06-06 15:34:15 +03:00
rename indx var to idx, drop exception
This commit is contained in:
parent
a03b2a9246
commit
bf48b89954
2 changed files with 6 additions and 7 deletions
1
.github/scripts/codespell-ignore.txt
vendored
1
.github/scripts/codespell-ignore.txt
vendored
|
|
@ -12,7 +12,6 @@ dout
|
|||
ede
|
||||
fo
|
||||
htpt
|
||||
indx
|
||||
inout
|
||||
nome
|
||||
numer
|
||||
|
|
|
|||
|
|
@ -71,14 +71,14 @@ void curlx_dyn_free(struct dynbuf *s)
|
|||
static CURLcode dyn_nappend(struct dynbuf *s,
|
||||
const unsigned char *mem, size_t len)
|
||||
{
|
||||
size_t indx = s->leng;
|
||||
size_t idx = s->leng;
|
||||
size_t a = s->allc;
|
||||
size_t fit = len + indx + 1; /* new string + old string + zero byte */
|
||||
size_t fit = len + idx + 1; /* new string + old string + zero byte */
|
||||
|
||||
/* try to detect if there is rubbish in the struct */
|
||||
DEBUGASSERT(s->init == DYNINIT);
|
||||
DEBUGASSERT(s->toobig);
|
||||
DEBUGASSERT(indx < s->toobig);
|
||||
DEBUGASSERT(idx < s->toobig);
|
||||
DEBUGASSERT(!s->leng || s->bufr);
|
||||
DEBUGASSERT(a <= s->toobig);
|
||||
DEBUGASSERT(!len || mem);
|
||||
|
|
@ -88,7 +88,7 @@ static CURLcode dyn_nappend(struct dynbuf *s,
|
|||
return CURLE_TOO_LARGE;
|
||||
}
|
||||
else if(!a) {
|
||||
DEBUGASSERT(!indx);
|
||||
DEBUGASSERT(!idx);
|
||||
/* first invoke */
|
||||
if(MIN_FIRST_ALLOC > s->toobig)
|
||||
a = s->toobig;
|
||||
|
|
@ -118,8 +118,8 @@ static CURLcode dyn_nappend(struct dynbuf *s,
|
|||
}
|
||||
|
||||
if(len)
|
||||
memcpy(&s->bufr[indx], mem, len);
|
||||
s->leng = indx + len;
|
||||
memcpy(&s->bufr[idx], mem, len);
|
||||
s->leng = idx + len;
|
||||
s->bufr[s->leng] = 0;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue