[hipl-dev] [Branch ~toxedvirus/hipl/hipfw-modules] Rev 5010: Remove error return on valid case where size equals 0, adjust documentation.

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Tue, 09 Nov 2010 13:38:38 -0000

------------------------------------------------------------
revno: 5010
committer: Andrius Bentkus <andrius.bentkus@xxxxxxxxxxxxxx>
branch nick: hipfw-modules
timestamp: Tue 2010-11-09 14:36:03 +0100
message:
  Remove error return on valid case where size equals 0, adjust documentation.
modified:
  lib/core/options.c


--
lp:~toxedvirus/hipl/hipfw-modules
https://code.launchpad.net/~toxedvirus/hipl/hipfw-modules

Your team HIPL core team is subscribed to branch 
lp:~toxedvirus/hipl/hipfw-modules.
To unsubscribe from this branch go to 
https://code.launchpad.net/~toxedvirus/hipl/hipfw-modules/+edit-subscription
=== modified file 'lib/core/options.c'
--- lib/core/options.c  2010-11-09 13:05:36 +0000
+++ lib/core/options.c  2010-11-09 13:36:03 +0000
@@ -357,7 +357,7 @@
  * @param option_list Target option list to be used in adding process.
  * @param modules     An array containing the module information.
  * @param size        Number of the module entries in the array.
- * @return            1 if one of the paramteres where not set,
+ * @return            1 if NULL is passed to option_list or modules,
  *                    0 on success.
  */
 int hip_cmd_init(struct hip_cmd_option_list *option_list,
@@ -369,7 +369,6 @@
     // check for bad paramters
     if (!option_list) return 1;
     if (!modules)     return 1;
-    if (!size)        return 1;
 
     for (i = 0; i < size; i++) {
         if (modules[i].cmd_function && !lmod_module_disabled(modules[i].name)) 
{

Other related posts:

  • » [hipl-dev] [Branch ~toxedvirus/hipl/hipfw-modules] Rev 5010: Remove error return on valid case where size equals 0, adjust documentation. - noreply