summaryrefslogtreecommitdiff
path: root/pbx/dundi-parser.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-07 00:44:55 +0000
committerSean Bright <sean@malleable.com>2008-08-07 00:44:55 +0000
commitb7a4db0ced614b2a619a02227883528a7bb0a1a6 (patch)
tree80d01b854334393ac9a340bc94f6fc74bd041827 /pbx/dundi-parser.c
parent367dfcb0ab6d7d47b39ed0a10ca84e51b73b6732 (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: https://origsvn.digium.com/svn/asterisk/trunk@136298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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++;