aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 00:44:55 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-07 00:44:55 +0000
commit71107a3e7c5fc6fa4ca8ef387c4f0478f57b9d62 (patch)
tree80d01b854334393ac9a340bc94f6fc74bd041827 /pbx/dundi-parser.c
parent156764ae9824f8ece3851e6ffa50b5046c96696f (diff)
Start moving in changes from my resolve-shadow-warnings branch. Going to do
this in pieces so the diffs are a little bit smaller and more reviewable. pbx/ and formats/ first. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136298 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/dundi-parser.c')
-rw-r--r--pbx/dundi-parser.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 50c45e08d..15dae84d6 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -339,7 +339,7 @@ static struct dundi_ie {
int ie;
char *name;
void (*dump)(char *output, int maxlen, void *value, int len);
-} ies[] = {
+} infoelts[] = {
{ DUNDI_IE_EID, "ENTITY IDENT", dump_eid },
{ DUNDI_IE_CALLED_CONTEXT, "CALLED CONTEXT", dump_string },
{ DUNDI_IE_CALLED_NUMBER, "CALLED NUMBER", dump_string },
@@ -370,9 +370,9 @@ static struct dundi_ie {
const char *dundi_ie2str(int ie)
{
int x;
- for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) {
- if (ies[x].ie == ie)
- return ies[x].name;
+ for (x = 0; x < ARRAY_LEN(infoelts); x++) {
+ if (infoelts[x].ie == ie)
+ return infoelts[x].name;
}
return "Unknown IE";
}
@@ -399,18 +399,18 @@ static void dump_ies(unsigned char *iedata, int spaces, int len)
return;
}
found = 0;
- for (x=0;x<(int)sizeof(ies) / (int)sizeof(ies[0]); x++) {
- if (ies[x].ie == ie) {
- if (ies[x].dump) {
- ies[x].dump(interp, (int)sizeof(interp), iedata + 2, ielen);
- snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), ies[x].name, interp);
+ for (x = 0; x < ARRAY_LEN(infoelts); x++) {
+ if (infoelts[x].ie == ie) {
+ if (infoelts[x].dump) {
+ infoelts[x].dump(interp, (int)sizeof(interp), iedata + 2, ielen);
+ snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), infoelts[x].name, interp);
outputf(tmp);
} else {
if (ielen)
snprintf(interp, (int)sizeof(interp), "%d bytes", ielen);
else
strcpy(interp, "Present");
- snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), ies[x].name, interp);
+ snprintf(tmp, (int)sizeof(tmp), " %s%-15.15s : %s\n", (spaces ? " " : "" ), infoelts[x].name, interp);
outputf(tmp);
}
found++;