mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user