summaryrefslogtreecommitdiff
path: root/src/cdf_time.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2019-03-12 20:43:05 +0000
committerChristos Zoulas <christos@zoulas.com>2019-03-12 20:43:05 +0000
commit1fffd3ee3165d068a49cdf7f1b0571382ba12088 (patch)
tree15f79c2845f760a0a63ec34bbc76cf77dcd779a8 /src/cdf_time.c
parentaea343d0a2711e6628ccb17c23d13d8e63cc136a (diff)
downloadfile-git-1fffd3ee3165d068a49cdf7f1b0571382ba12088.tar.gz
cleanup __arraycount
Diffstat (limited to 'src/cdf_time.c')
-rw-r--r--src/cdf_time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cdf_time.c b/src/cdf_time.c
index bdb2d3a2..e4eea4c7 100644
--- a/src/cdf_time.c
+++ b/src/cdf_time.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf_time.c,v 1.18 2019/02/20 02:35:27 christos Exp $")
+FILE_RCSID("@(#)$File: cdf_time.c,v 1.19 2019/03/12 20:43:05 christos Exp $")
#endif
#include <time.h>
@@ -68,7 +68,7 @@ cdf_getday(int year, int days)
{
size_t m;
- for (m = 0; m < sizeof(mdays) / sizeof(mdays[0]); m++) {
+ for (m = 0; m < __arraycount(mdays); m++) {
int sub = mdays[m] + (m == 1 && isleap(year));
if (days < sub)
return days;
@@ -85,7 +85,7 @@ cdf_getmonth(int year, int days)
{
size_t m;
- for (m = 0; m < sizeof(mdays) / sizeof(mdays[0]); m++) {
+ for (m = 0; m < __arraycount(mdays); m++) {
days -= mdays[m];
if (m == 1 && isleap(year))
days--;