summaryrefslogtreecommitdiff
path: root/channels/iax2-provision.c
diff options
context:
space:
mode:
authorBrett Bryant <bbryant@digium.com>2008-07-08 16:40:28 +0000
committerBrett Bryant <bbryant@digium.com>2008-07-08 16:40:28 +0000
commitd1854057559b8893eee71c7b52356d80a24eb72b (patch)
treedf03af827ea95734e2906e4737660d983e3e0b01 /channels/iax2-provision.c
parent2ed6cea5515860b2b062a70c18b3118266716abd (diff)
Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002) Reported by: caio1982 Patches: janitor_arraylen5.diff uploaded by caio1982 (license 22) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/iax2-provision.c')
-rw-r--r--channels/iax2-provision.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c
index 4a5281c05..8bdfdbfb7 100644
--- a/channels/iax2-provision.c
+++ b/channels/iax2-provision.c
@@ -87,7 +87,7 @@ char *iax_provflags2str(char *buf, int buflen, unsigned int flags)
buf[0] = '\0';
- for (x = 0; x < sizeof(iax_flags) / sizeof(iax_flags[0]); x++) {
+ for (x = 0; x < ARRAY_LEN(iax_flags); x++) {
if (flags & iax_flags[x].value){
strncat(buf, iax_flags[x].name, buflen - strlen(buf) - 1);
strncat(buf, ",", buflen - strlen(buf) - 1);
@@ -116,7 +116,7 @@ static unsigned int iax_str2flags(const char *buf)
else
len = 0;
found = 0;
- for (x=0;x<sizeof(iax_flags) / sizeof(iax_flags[0]); x++) {
+ for (x = 0; x < ARRAY_LEN(iax_flags); x++) {
if ((len && !strncasecmp(iax_flags[x].name, buf, len)) ||
(!len && !strcasecmp(iax_flags[x].name, buf))) {
flags |= iax_flags[x].value;