aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-29 17:00:33 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-29 17:00:33 +0000
commitb7e6d89aa23372a6a6d647bf6d3bfe3192e4c519 (patch)
treed331e5cecc9b0a3c2d3c3e29adbc134c1d3d0fe2 /pbx
parenta4b06d6ac114064bbbb705dcdeab9f53c1257f40 (diff)
don't use '%i' at all, since we have no current use cases that need non base-10 parsing (bug #4110)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5533 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_config.c4
-rwxr-xr-xpbx/pbx_dundi.c8
-rwxr-xr-xpbx/pbx_loopback.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 33a669396..a2056e784 100755
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1191,7 +1191,7 @@ static int handle_context_add_extension(int fd, int argc, char *argv[])
if (!strcmp(prior, "hint")) {
iprior = PRIORITY_HINT;
} else {
- if (sscanf(prior, "%i", &iprior) != 1) {
+ if (sscanf(prior, "%d", &iprior) != 1) {
ast_cli(fd, "'%s' is not a valid priority\n", prior);
prior = NULL;
}
@@ -1700,7 +1700,7 @@ static int pbx_load_module(void)
else
ast_log(LOG_WARNING, "Can't use 'same' priority on the first entry!\n");
} else {
- if (sscanf(pri, "%i", &ipri) != 1) {
+ if (sscanf(pri, "%d", &ipri) != 1) {
if ((ipri = ast_findlabel_extension2(NULL, con, realext, pri, cidmatch)) < 1) {
ast_log(LOG_WARNING, "Invalid priority/label '%s' at line %d\n", pri, v->lineno);
ipri = 0;
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index b80867b29..ca3c4441a 100755
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -4059,7 +4059,7 @@ static void build_mapping(char *name, char *value)
} else if (x >= 4) {
strncpy(map->dcontext, name, sizeof(map->dcontext) - 1);
strncpy(map->lcontext, fields[0], sizeof(map->lcontext) - 1);
- if ((sscanf(fields[1], "%i", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
+ if ((sscanf(fields[1], "%d", &map->weight) == 1) && (map->weight >= 0) && (map->weight < 60000)) {
strncpy(map->dest, fields[3], sizeof(map->dest) - 1);
if ((map->tech = str2tech(fields[2]))) {
map->dead = 0;
@@ -4502,14 +4502,14 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
} else if (!strcasecmp(v->name, "authdebug")) {
authdebug = ast_true(v->value);
} else if (!strcasecmp(v->name, "ttl")) {
- if ((sscanf(v->value, "%i", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
+ if ((sscanf(v->value, "%d", &x) == 1) && (x > 0) && (x < DUNDI_DEFAULT_TTL)) {
dundi_ttl = x;
} else {
ast_log(LOG_WARNING, "'%s' is not a valid TTL at line %d, must be number from 1 to %d\n",
v->value, v->lineno, DUNDI_DEFAULT_TTL);
}
} else if (!strcasecmp(v->name, "autokill")) {
- if (sscanf(v->value, "%i", &x) == 1) {
+ if (sscanf(v->value, "%d", &x) == 1) {
if (x >= 0)
global_autokilltimeout = x;
else
@@ -4525,7 +4525,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
else
ast_log(LOG_WARNING, "Invalid global endpoint identifier '%s' at line %d\n", v->value, v->lineno);
} else if (!strcasecmp(v->name, "tos")) {
- if (sscanf(v->value, "%i", &format) == 1)
+ if (sscanf(v->value, "%d", &format) == 1)
tos = format & 0xff;
else if (!strcasecmp(v->value, "lowdelay"))
tos = IPTOS_LOWDELAY;
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index 8fb7b3f7e..065cac855 100755
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -108,7 +108,7 @@ static void loopback_subst(char **newexten, char **newcontext, int *priority, ch
if (con && !ast_strlen_zero(con))
*newcontext = con;
if (pri && !ast_strlen_zero(pri))
- sscanf(pri, "%i", priority);
+ sscanf(pri, "%d", priority);
}
static int loopback_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)