]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shut up stupid analyzer
authorAlan T. DeKok <aland@freeradius.org>
Sat, 16 May 2020 21:09:10 +0000 (17:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 16 May 2020 21:09:10 +0000 (17:09 -0400)
it's too stupid to know that while 'cp' isn't used inside of the
loop, it *is* used in the loop condition.

src/modules/proto_detail/proto_detail.c

index 5bf34644e6fb2ad8852810f2db8535f25d74ff82..15989f031cca44ba2e0e3957043debb91ea55d85 100644 (file)
@@ -512,9 +512,13 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
        /*
         *      Instantiate the process module.
         */
-       while ((cp = cf_pair_find_next(conf, cp, "type"))) {
+       while ((cp = cf_pair_find_next(conf, cp, "type")) != NULL) {
                fr_app_worker_t const *app_process;
 
+#ifdef __clang_analyzer__
+               DEBUG("Instantiating %s", cf_pair_value(cp));
+#endif
+
                app_process = (fr_app_worker_t const *)inst->type_submodule->module->common;
                if (app_process->instantiate && (app_process->instantiate(inst->type_submodule->data,
                                                                          inst->type_submodule->conf) < 0)) {