*/
void mutt_check_lookup_list(struct Body *b, char *type, size_t len)
{
- int i;
-
struct ListNode *np;
STAILQ_FOREACH(np, &MimeLookupList, entries)
{
- i = mutt_str_strlen(np->data) - 1;
+ const int i = mutt_str_strlen(np->data) - 1;
if ((i > 0 && np->data[i - 1] == '/' && np->data[i] == '*' &&
(mutt_str_strncasecmp(type, np->data, i) == 0)) ||
(mutt_str_strcasecmp(type, np->data) == 0))
void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach)
{
- int i;
-
if (actx->idxlen == actx->idxmax)
{
actx->idxmax += 5;
mutt_mem_realloc(&actx->idx, sizeof(struct AttachPtr *) * actx->idxmax);
mutt_mem_realloc(&actx->v2r, sizeof(short) * actx->idxmax);
- for (i = actx->idxlen; i < actx->idxmax; i++)
+ for (int i = actx->idxlen; i < actx->idxmax; i++)
actx->idx[i] = NULL;
}
void mutt_actx_add_fp(struct AttachCtx *actx, FILE *new_fp)
{
- int i;
-
if (actx->fp_len == actx->fp_max)
{
actx->fp_max += 5;
mutt_mem_realloc(&actx->fp_idx, sizeof(FILE *) * actx->fp_max);
- for (i = actx->fp_len; i < actx->fp_max; i++)
+ for (int i = actx->fp_len; i < actx->fp_max; i++)
actx->fp_idx[i] = NULL;
}
void mutt_actx_add_body(struct AttachCtx *actx, struct Body *new_body)
{
- int i;
-
if (actx->body_len == actx->body_max)
{
actx->body_max += 5;
mutt_mem_realloc(&actx->body_idx, sizeof(struct Body *) * actx->body_max);
- for (i = actx->body_len; i < actx->body_max; i++)
+ for (int i = actx->body_len; i < actx->body_max; i++)
actx->body_idx[i] = NULL;
}