From: James Jones Date: Sat, 23 Jul 2022 11:48:00 +0000 (-0500) Subject: Don't check a value we know isn't NULL (CID #1503909) (#4618) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b3f9be1c8a78da66ab18645aeb82273fdbc51a5;p=thirdparty%2Ffreeradius-server.git Don't check a value we know isn't NULL (CID #1503909) (#4618) 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. --- diff --git a/src/listen/load/proto_load_step.c b/src/listen/load/proto_load_step.c index cbbcb93dbc3..6e792018618 100644 --- a/src/listen/load/proto_load_step.c +++ b/src/listen/load/proto_load_step.c @@ -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;