[hipl-dev] Re: [Branch ~toxedvirus/hipl/hipfw-modules] Rev 5008: Forward command line initialization to modules in order to allow registering command line options...

  • From: Stefan Götz <stefan.goetz@xxxxxxxxxxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Thu, 04 Nov 2010 11:36:52 +0100

> +void hip_cmd_init(struct hip_cmd_option_list *option_list,
> +                  const struct module_info *const modules,
> +                  const unsigned int size)
> +{
> +    unsigned int i;
> +    for (i = 0; i < size; i++) {
> +        if ((modules[i].cmd_function != NULL) && 
> !lmod_module_disabled(modules[i].name)) {
> +            modules[i].cmd_function(option_list);
> +        }
> +    }
> +}

Diego seems to not like the '!= NULL' in checks so much...

Why does this function not check the option_list and modules parameters for NULL
pointers?

Stefan

Other related posts: