remove unnecessary assert
[freeradius.git] / src / main / modules.c
index 91218dd..749c07e 100644 (file)
@@ -578,7 +578,7 @@ static int module_conf_parse(module_instance_t *node, void **handle)
         */
        if (node->entry->module->inst_size) {
                *handle = talloc_zero_array(node, uint8_t, node->entry->module->inst_size);
-               rad_assert(handle);
+               rad_assert(*handle);
 
                talloc_set_name(*handle, "rlm_%s_t",
                                node->entry->module->name ? node->entry->module->name : "config");
@@ -1248,7 +1248,8 @@ static int load_component_section(CONF_SECTION *cs,
 
 static int load_byserver(CONF_SECTION *cs)
 {
-       rlm_components_t comp, found;
+       rlm_components_t comp;
+       bool found;
        char const *name = cf_section_name2(cs);
        rbtree_t *components;
        virtual_server_t *server = NULL;
@@ -1286,7 +1287,7 @@ static int load_byserver(CONF_SECTION *cs)
         *      Loop over all of the known components, finding their
         *      configuration section, and loading it.
         */
-       found = 0;
+       found = false;
        for (comp = 0; comp < MOD_COUNT; ++comp) {
                CONF_SECTION *subcs;
 
@@ -1346,7 +1347,7 @@ static int load_byserver(CONF_SECTION *cs)
 
                server->subcs[comp] = subcs;
 
-               found = 1;
+               found = true;
        } /* loop over components */
 
        /*