[asterisk-commits] trunk r12843 - /trunk/apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 14 00:17:32 MST 2006
Author: oej
Date: Tue Mar 14 01:17:30 2006
New Revision: 12843
URL: http://svn.digium.com/view/asterisk?rev=12843&view=rev
Log:
Small fixes to the messagecount function (while trying to understand
a bug report...)
- Remove unused variable "ret"
- Declare char* pointers in the block where they are used
Modified:
trunk/apps/app_voicemail.c
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=12843&r1=12842&r2=12843&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Mar 14 01:17:30 2006
@@ -2207,10 +2207,9 @@
DIR *dir;
struct dirent *de;
char fn[256];
- char tmp[256]="";
- char *mb, *cur;
+ char tmp[256];
char *context;
- int ret;
+
if (newmsgs)
*newmsgs = 0;
if (oldmsgs)
@@ -2220,9 +2219,10 @@
return 0;
if (strchr(mailbox, ',')) {
int tmpnew, tmpold;
+ char *mb, *cur;
+
ast_copy_string(tmp, mailbox, sizeof(tmp));
mb = tmp;
- ret = 0;
while((cur = strsep(&mb, ", "))) {
if (!ast_strlen_zero(cur)) {
if (messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
More information about the asterisk-commits
mailing list