From 2ac6c4648a2723630e959aae1591629d970ac631 Mon Sep 17 00:00:00 2001 From: bbryant Date: Fri, 11 Jul 2008 18:14:27 +0000 Subject: Merged revisions 130129 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r130129 | bbryant | 2008-07-11 13:09:35 -0500 (Fri, 11 Jul 2008) | 8 lines 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/branches/1.6.0@130130 f38db490-d61c-443f-a65b-d21fe96a405b --- utils/astman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/astman.c b/utils/astman.c index f674105a5..6c8d74291 100644 --- a/utils/astman.c +++ b/utils/astman.c @@ -258,14 +258,14 @@ static int process_message(struct ast_mansession *s, struct message *m) fprintf(stderr, "Missing event in request"); return 0; } - for (x=0;x= sizeof(events) / sizeof(events[0])) + if (x >= ARRAY_LEN(events)) fprintf(stderr, "Ignoring unknown event '%s'", event); #if 0 for (x=0;xhdrcount;x++) { -- cgit v1.2.3