aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:09:35 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:09:35 +0000
commit8e222897e657656b5b9af006b50e51812dbed1bb (patch)
treed6654284a45ddbc17f083bedcf5d1055fd08f634 /channels/chan_sip.c
parent802d09a41e12f28f64a4f6be443ecf0db251b28d (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: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
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];
}