aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:41:31 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:41:31 +0000
commit3b5c2f2ec9a1f1b932a72c54ec99f2ade7b874e5 (patch)
tree2e4756c8d1b95bdec564a84466c61973aa5e336e /main/acl.c
parentb2d0a411d289307a4a22e2647d0ad5540542de01 (diff)
Merged revisions 129045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r129045 | bbryant | 2008-07-08 11:40:28 -0500 (Tue, 08 Jul 2008) | 7 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@129046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r--main/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/acl.c b/main/acl.c
index d903851ee..54747de5f 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -434,7 +434,7 @@ int ast_str2tos(const char *value, unsigned int *tos)
return 0;
}
- for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
+ for (x = 0; x < ARRAY_LEN(dscp_pool1); x++) {
if (!strcasecmp(value, dscp_pool1[x].name)) {
*tos = dscp_pool1[x].space << 2;
return 0;
@@ -448,7 +448,7 @@ const char *ast_tos2str(unsigned int tos)
{
unsigned int x;
- for (x = 0; x < sizeof(dscp_pool1) / sizeof(dscp_pool1[0]); x++) {
+ for (x = 0; x < ARRAY_LEN(dscp_pool1); x++) {
if (dscp_pool1[x].space == (tos >> 2))
return dscp_pool1[x].name;
}