aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-14 07:17:30 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-14 07:17:30 +0000
commitfcd5783b8611e5ca69a0c98969689283a1db8d70 (patch)
tree8d41324ec046d06a526966018f76f779c19ebe67 /apps
parenta9b7bcf85de1974bab3b751cc5005d4c55b24f7e (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12843 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 168c96895..5a73e3c50 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2207,10 +2207,9 @@ static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
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 @@ static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
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))