nullPointerRedundantCheck

This commit is contained in:
francescomani
2024-04-09 16:55:51 +02:00
parent ddf3b1614c
commit 8404da759f
28 changed files with 78 additions and 75 deletions
+4 -6
View File
@@ -395,11 +395,9 @@ void write_parsedcfg(configmodule_interface_t *cfgptr)
cfgptr->status->emptyla,
cfgptr->status->num_write);
}
if (cfgptr != NULL) {
if (cfgptr->write_parsedcfg != NULL) {
printf("[CONFIG] calling config module write_parsedcfg function...\n");
cfgptr->write_parsedcfg(cfgptr);
}
if (cfgptr->write_parsedcfg != NULL) {
printf("[CONFIG] calling config module write_parsedcfg function...\n");
cfgptr->write_parsedcfg(cfgptr);
}
}
@@ -407,8 +405,8 @@ void write_parsedcfg(configmodule_interface_t *cfgptr)
/* config module could be initialized again after this call */
void end_configmodule(configmodule_interface_t *cfgptr)
{
write_parsedcfg(cfgptr);
if (cfgptr != NULL) {
write_parsedcfg(cfgptr);
if (cfgptr->end != NULL) {
printf ("[CONFIG] calling config module end function...\n");
cfgptr->end(cfgptr);