src: fix issues reported by clang-tidy

Some of those are simply ignored as they're false positives.
This commit is contained in:
Arnaud Ferraris
2024-10-29 15:03:45 +01:00
parent 2c311b9022
commit f978b775e0
5 changed files with 16 additions and 11 deletions

View File

@@ -396,7 +396,11 @@ static int e_keyexists(context_t *ctx, int lineno)
static void *expand(void *p, int sz, int newsz)
{
void *s = MALLOC(newsz);
void *s;
if (!p)
return 0;
s = MALLOC(newsz);
if (!s)
return 0;
@@ -1499,7 +1503,6 @@ toml_table_t *toml_parse_file(FILE *fp, char *errbuf, int errbufsz)
return 0;
}
buf = x;
bufsz = xsz;
}
buf[off] = 0;