mirror of
https://passt.top/passt
synced 2025-06-11 18:15:34 +02:00
passt: Address warnings from Clang's scan-build
All false positives so far. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
1a563a0cbd
commit
b0b77118fe
4 changed files with 53 additions and 38 deletions
6
conf.c
6
conf.c
|
@ -323,7 +323,9 @@ static void get_dns(struct ctx *c)
|
|||
if (end)
|
||||
*end = 0;
|
||||
|
||||
p = strtok(buf, " \t");
|
||||
if (!strtok(buf, " \t"))
|
||||
continue;
|
||||
|
||||
while (s - c->dns_search < ARRAY_SIZE(c->dns_search) - 1
|
||||
&& (p = strtok(NULL, " \t"))) {
|
||||
strncpy(s->n, p, sizeof(c->dns_search[0]));
|
||||
|
@ -371,7 +373,7 @@ static int conf_ns_opt(struct ctx *c,
|
|||
char *nsdir, char *conf_userns, const char *optarg)
|
||||
{
|
||||
int ufd = 0, nfd = 0, try, ret, netns_only_reset = c->netns_only;
|
||||
char userns[PATH_MAX], netns[PATH_MAX];
|
||||
char userns[PATH_MAX] = { 0 }, netns[PATH_MAX];
|
||||
char *endptr;
|
||||
pid_t pid;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue