On Thu, Nov 04, 2010 at 11:51:02AM +0100, Andrius Bentkus wrote: > 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? Does the following not work? if ((modules[i].cmd_function != NULL) && !lmod_module_disabled(modules[i].name)) { ---> if (modules[i].cmd_function && !lmod_module_disabled(modules[i].name)) { Diego