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: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Brett Bryant
2008-07-08 16:40:28 +00:00
parent 2ed6cea551
commit d185405755
19 changed files with 77 additions and 70 deletions

View File

@@ -71,7 +71,7 @@ int dundi_str_short_to_eid(dundi_eid *eid, const char *s)
if (sscanf(s, "%2x%2x%2x%2x%2x%2x", &eid_int[0], &eid_int[1], &eid_int[2],
&eid_int[3], &eid_int[4], &eid_int[5]) != 6)
return -1;
for (x=0;x<6;x++)
for (x = 0; x < 6; x++)
eid->eid[x] = eid_int[x];
return 0;
}
@@ -79,7 +79,7 @@ int dundi_str_short_to_eid(dundi_eid *eid, const char *s)
int dundi_eid_zero(dundi_eid *eid)
{
int x;
for (x=0;x<sizeof(eid->eid) / sizeof(eid->eid[0]);x++)
for (x = 0; x < ARRAY_LEN(eid->eid); x++)
if (eid->eid[x]) return 0;
return 1;
}