From 5b7933fe5e47ad0bc333b405f554c20f8cc2efed Mon Sep 17 00:00:00 2001 From: Brett Bryant Date: Fri, 11 Jul 2008 18:09:35 +0000 Subject: 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 --- pbx/dundi-parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pbx/dundi-parser.c') diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c index b37c6905f..50c45e08d 100644 --- a/pbx/dundi-parser.c +++ b/pbx/dundi-parser.c @@ -181,7 +181,7 @@ static void dump_cause(char *output, int maxlen, void *value, int len) memcpy(tmp2, cause->desc, datalen); tmp2[datalen] = '\0'; - if (causecode < sizeof(causes) / sizeof(causes[0])) { + if (causecode < ARRAY_LEN(causes)) { if (ast_strlen_zero(tmp2)) snprintf(output, maxlen, "%s", causes[causecode]); else -- cgit v1.2.3