]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't check a value we know isn't NULL (CID #1503909) (#4618)
authorJames Jones <jejones3141@gmail.com>
Sat, 23 Jul 2022 11:48:00 +0000 (06:48 -0500)
committerGitHub <noreply@github.com>
Sat, 23 Jul 2022 11:48:00 +0000 (18:48 +0700)
inst->filename will not be NULL. The check for that (after it's
already been used in open()) makes coverity complain, so we should
have the courage of our convictions.

src/listen/load/proto_load_step.c

index cbbcb93dbc391cdcdf8c64a1d102c1bd92924c48..6e792018618bbc0046fa194c95a6f6b68c166ba3 100644 (file)
@@ -208,7 +208,7 @@ static int mod_open(fr_listen_t *li)
 
        fr_assert((cf_parent(inst->cs) != NULL) && (cf_parent(cf_parent(inst->cs)) != NULL));   /* listen { ... } */
 
-       thread->name = talloc_typed_asprintf(thread, "load_step from filename %s", inst->filename ? inst->filename : "none");
+       thread->name = talloc_typed_asprintf(thread, "load_step from filename %s", inst->filename);
        thread->parent = talloc_parent(li);
 
        return 0;