summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2012-04-17 18:57:40 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2012-04-17 18:57:40 +0000
commitfc63e07135d645af0df8d393aa84c0ae3b7e1924 (patch)
treef40524fe8e0facf5542c6b02041bc1fc63eae66e /apps
parent70c5ac6635062efe03b51fb6c7afd30c22028be9 (diff)
Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky Review: https://reviewboard.asterisk.org/r/1743/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_minivm.c3
-rw-r--r--apps/app_osplookup.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index cd613b67d..dcfb3629f 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -3397,7 +3397,6 @@ static int minivm_counter_func_write(struct ast_channel *chan, const char *cmd,
{
char *username, *domain, *countername, *operand;
char userpath[BUFSIZ];
- struct minivm_account *vmu;
int change = 0;
int operation = 0;
@@ -3442,7 +3441,7 @@ static int minivm_counter_func_write(struct ast_channel *chan, const char *cmd,
}
/* If we can't find account or if the account is temporary, return. */
- if (!ast_strlen_zero(username) && !(vmu = find_account(domain, username, FALSE))) {
+ if (!ast_strlen_zero(username) && !find_account(domain, username, FALSE)) {
ast_log(LOG_ERROR, "Minivm account does not exist: %s@%s\n", username, domain);
return 0;
}
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index ba7bb03cb..d63c6daa3 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -620,7 +620,7 @@ struct osp_metrics {
/* OSP Module Global Variables */
AST_MUTEX_DEFINE_STATIC(osp_lock); /* Lock of OSP provider list */
static int osp_initialized = 0; /* Init flag */
-static int osp_hardware = 0; /* Hardware accelleration flag */
+static int osp_hardware = 0; /* Hardware acceleration flag */
static int osp_security = 0; /* Using security features flag */
static struct osp_provider* osp_providers = NULL; /* OSP provider list */
static unsigned int osp_tokenformat = TOKEN_ALGO_SIGNED; /* Token format supported */
@@ -2336,7 +2336,7 @@ static int osplookup_exec(
struct ast_channel* chan,
const char * data)
{
- int res, cres;
+ int res;
const char* provider = OSP_DEF_PROVIDER;
unsigned int callidtypes = OSP_CALLID_UNDEF;
struct varshead* headp;
@@ -2504,7 +2504,7 @@ static int osplookup_exec(
}
}
- if ((cres = ast_autoservice_start(chan)) < 0) {
+ if (ast_autoservice_start(chan) < 0) {
return OSP_AST_ERROR;
}
@@ -2608,7 +2608,7 @@ static int osplookup_exec(
pbx_builtin_setvar_helper(chan, "OSPDIALSTR", buffer);
}
- if ((cres = ast_autoservice_stop(chan)) < 0) {
+ if (ast_autoservice_stop(chan) < 0) {
return OSP_AST_ERROR;
}
@@ -2982,7 +2982,7 @@ static int osp_load(int reload)
if ((cvar = ast_variable_retrieve(cfg, OSP_GENERAL_CAT, "accelerate")) && ast_true(cvar)) {
if ((error = OSPPInit(1)) != OSPC_ERR_NO_ERROR) {
- ast_log(LOG_WARNING, "OSP: Unable to enable hardware accelleration\n");
+ ast_log(LOG_WARNING, "OSP: Unable to enable hardware acceleration, error='%d'\n", error);
OSPPInit(0);
} else {
osp_hardware = 1;