[svn-commits] anthonyl: branch anthonyl/voicemail-fixups r51174 - /team/anthonyl/voicemail-...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 16 17:53:17 MST 2007


Author: anthonyl
Date: Tue Jan 16 18:53:17 2007
New Revision: 51174

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51174
Log:
cleaning vm_change_password up a tad by getting rid of our need to use len

Modified:
    team/anthonyl/voicemail-fixups/apps/app_voicemail.c

Modified: team/anthonyl/voicemail-fixups/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/voicemail-fixups/apps/app_voicemail.c?view=diff&rev=51174&r1=51173&r2=51174
==============================================================================
--- team/anthonyl/voicemail-fixups/apps/app_voicemail.c (original)
+++ team/anthonyl/voicemail-fixups/apps/app_voicemail.c Tue Jan 16 18:53:17 2007
@@ -761,7 +761,6 @@
 	struct ast_category *cat=NULL;
 	char *category=NULL, *value=NULL, *new=NULL;
 	const char *tmp=NULL;
-	int len;
 					
 	if (!change_password_realtime(vmu, newpassword))
 		return;
@@ -780,8 +779,7 @@
 					ast_log(LOG_WARNING, "variable has bad format.\n");
 					break;
 				}
-				len = (strlen(value) + strlen(newpassword));
-				new = alloca(len+1);
+				new = alloca((strlen(value)+strlen(newpassword)+1));
 				sprintf(new,"%s%s", newpassword, value);
 				if (!(cat = ast_category_get(cfg, category))) {
 					ast_log(LOG_WARNING, "Failed to get category structure.\n");



More information about the svn-commits mailing list