On Thu, Nov 4, 2010 at 11:36 AM, Stefan Götz <stefan.goetz@xxxxxxxxxxxxxxxxx > wrote: > > +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... > How else am I supposed to check a function pointer? > > Why does this function not check the option_list and modules parameters for > NULL > pointers? > Shall I check every paramter for a possible NULL value and print an error message? > Stefan > >