aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:41:31 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 16:41:31 +0000
commit3b5c2f2ec9a1f1b932a72c54ec99f2ade7b874e5 (patch)
tree2e4756c8d1b95bdec564a84466c61973aa5e336e /main/logger.c
parentb2d0a411d289307a4a22e2647d0ad5540542de01 (diff)
Merged revisions 129045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r129045 | bbryant | 2008-07-08 11:40:28 -0500 (Tue, 08 Jul 2008) | 7 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@129046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/logger.c b/main/logger.c
index 173fe5d24..aeac79c53 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -481,7 +481,7 @@ static int rotate_file(const char *filename)
/* Find the next empty slot, including a possible suffix */
for (x = 0; ; x++) {
found = 0;
- for (which = 0; which < sizeof(suffixes) / sizeof(suffixes[0]); which++) {
+ for (which = 0; which < ARRAY_LEN(suffixes); which++) {
snprintf(new, sizeof(new), "%s.%d%s", filename, x, suffixes[which]);
fd = open(new, O_RDONLY);
if (fd > -1)
@@ -497,7 +497,7 @@ static int rotate_file(const char *filename)
/* Found an empty slot */
for (y = x; y > -1; y--) {
- for (which = 0; which < sizeof(suffixes) / sizeof(suffixes[0]); which++) {
+ for (which = 0; which < ARRAY_LEN(suffixes); which++) {
snprintf(old, sizeof(old), "%s.%d%s", filename, y - 1, suffixes[which]);
fd = open(old, O_RDONLY);
if (fd > -1) {