summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorBrett Bryant <bbryant@digium.com>2008-07-11 18:09:35 +0000
committerBrett Bryant <bbryant@digium.com>2008-07-11 18:09:35 +0000
commit5b7933fe5e47ad0bc333b405f554c20f8cc2efed (patch)
treed6654284a45ddbc17f083bedcf5d1055fd08f634 /channels/chan_sip.c
parentcb7df89042404cf3ca065a8bdeac07c25eaf8922 (diff)
Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0d2743ca9..245d75717 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2601,7 +2601,7 @@ static int find_sip_method(const char *msg)
if (ast_strlen_zero(msg))
return 0;
- for (i = 1; i < (sizeof(sip_methods) / sizeof(sip_methods[0])) && !res; i++) {
+ for (i = 1; i < (ARRAY_LEN(sip_methods)) && !res; i++) {
if (method_match(i, msg))
res = sip_methods[i].id;
}
@@ -13640,7 +13640,7 @@ static const char *subscription_type2str(enum subscriptiontype subtype)
{
int i;
- for (i = 1; (i < (sizeof(subscription_types) / sizeof(subscription_types[0]))); i++) {
+ for (i = 1; i < ARRAY_LEN(subscription_types); i++) {
if (subscription_types[i].type == subtype) {
return subscription_types[i].text;
}
@@ -13653,7 +13653,7 @@ static const struct cfsubscription_types *find_subscription_type(enum subscripti
{
int i;
- for (i = 1; (i < (sizeof(subscription_types) / sizeof(subscription_types[0]))); i++) {
+ for (i = 1; i < ARRAY_LEN(subscription_types); i++) {
if (subscription_types[i].type == subtype) {
return &subscription_types[i];
}