[asterisk-commits] branch oej/test-this-branch r12398 - /team/oej/test-this-branch/funcs/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 7 13:16:09 MST 2006


Author: oej
Date: Tue Mar  7 14:16:07 2006
New Revision: 12398

URL: http://svn.digium.com/view/asterisk?rev=12398&view=rev
Log:
Return 0 on false

Modified:
    team/oej/test-this-branch/funcs/func_module.c

Modified: team/oej/test-this-branch/funcs/func_module.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/funcs/func_module.c?rev=12398&r1=12397&r2=12398&view=diff
==============================================================================
--- team/oej/test-this-branch/funcs/func_module.c (original)
+++ team/oej/test-this-branch/funcs/func_module.c Tue Mar  7 14:16:07 2006
@@ -41,7 +41,7 @@
 static int ifmodule_read(struct ast_channel *chan, char *cmd, char *data,
 		    char *buf, size_t len)
 {
-	char *ret = NULL;
+	char *ret = "0";
 
 	*buf = '\0';
 
@@ -49,8 +49,7 @@
 		if (ast_module_check(data))
 			ret = "1";
 
-	if (ret)
-		ast_copy_string(buf, ret, len);
+	ast_copy_string(buf, ret, len);
 
 	return 0;
 }
@@ -62,7 +61,7 @@
 	.read = ifmodule_read,
 	.desc = "Checks if a module is loaded. Use the full module name\n"
 		"as shown by the list in \"show modules\". \n"
-		"Returns \"1\" if module exists in memory, otherwise nothing.\n",
+		"Returns \"1\" if module exists in memory, otherwise \"0\".\n",
 };
 
 static char *tdesc = "Checks if Asterisk module is loaded in memory";



More information about the asterisk-commits mailing list