Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 111960) +++ apps/app_voicemail.c (working copy) @@ -778,11 +778,11 @@ ast_log(LOG_WARNING, "Maximum number of deleted messages saved per mailbox is %d. Cannot accept value backupdeleted=%s\n", MAXMSGLIMIT, value); vmu->maxdeletedmsg = MAXMSGLIMIT; } - } else if (!strcasecmp(var, "volgain")) { + } else if (!strcasecmp(var, "volgain")) sscanf(value, "%lf", &vmu->volgain); - } else if (!strcasecmp(var, "options")) { + else if (!strcasecmp(var, "options")) apply_options(vmu, value); - } + } static int change_password_realtime(struct ast_vm_user *vmu, const char *password) @@ -793,9 +793,9 @@ if (res > 0) { ast_copy_string(vmu->password, password, sizeof(vmu->password)); res = 0; - } else if (!res) { + } else if (!res) res = -1; - } + return res; } return -1; @@ -809,9 +809,8 @@ stringp = ast_strdupa(options); while ((s = strsep(&stringp, "|"))) { value = s; - if ((var = strsep(&value, "=")) && value) { + if ((var = strsep(&value, "=")) && value) apply_option(vmu, var, value); - } } } @@ -1458,7 +1457,11 @@ char full_fn[PATH_MAX]; char fmt[80] = ""; char *c; - const char *context = "", *macrocontext = "", *callerid = "", *origtime = "", *duration = ""; + const char *context = ""; + const char *macrocontext = ""; + const char *callerid = ""; + const char *origtime = ""; + const char *duration = ""; const char *category = ""; struct ast_config *cfg = NULL; struct odbc_obj *obj; @@ -3046,10 +3049,12 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_options *options) { #ifdef IMAP_STORAGE - int newmsgs, oldmsgs; + int newmsgs; + int oldmsgs; struct vm_state *vms = NULL; #endif - char txtfile[PATH_MAX], tmptxtfile[PATH_MAX]; + char txtfile[PATH_MAX]; + char tmptxtfile[PATH_MAX]; char callerid[256]; FILE *txt; char date[256]; @@ -3065,7 +3070,8 @@ char tmpdur[16]; char priority[16]; char origtime[16]; - char dir[PATH_MAX], tmpdir[PATH_MAX]; + char dir[PATH_MAX]; + char tmpdir[PATH_MAX]; char fn[PATH_MAX]; char prefile[PATH_MAX] = ""; char tempfile[PATH_MAX] = ""; @@ -3073,10 +3079,13 @@ char fmt[80]; char *context; char ecodes[17] = "#"; - char tmp[1024] = "", *tmpptr; + char tmp[1024] = ""; + char *tmpptr; struct ast_vm_user *vmu; struct ast_vm_user svm; - const char *category = NULL, *code, *alldtmf = "0123456789ABCD*#"; + const char *category = NULL; + const char *code; + const char *alldtmf = "0123456789ABCD*#"; ast_copy_string(tmp, ext, sizeof(tmp)); ext = tmp;