OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22f509a
)
Add macro that checks whether year is leap.
author
relan
<relan@users.noreply.github.com>
Fri, 2 Oct 2009 16:15:31 +0000
(16:15 +0000)
committer
relan
<relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:10 +0000
(08:26 +0300)
Only XX and XXI centuries are considered, so the check is simplified.
libexfat/utils.c
patch
|
blob
|
history
diff --git
a/libexfat/utils.c
b/libexfat/utils.c
index
9fef909
..
f079f86
100644
(file)
--- a/
libexfat/utils.c
+++ b/
libexfat/utils.c
@@
-110,6
+110,8
@@
void exfat_stat(const struct exfat_node* node, struct stat *stbuf)
(excluding the specified year itself) */
#define LEAP_YEARS(year) ((EXFAT_EPOCH_YEAR + (year) - 1) / 4 \
- (EXFAT_EPOCH_YEAR - 1) / 4)
+/* checks whether the specified year is leap */
+#define IS_LEAP_YEAR(year) ((EXFAT_EPOCH_YEAR + (year)) % 4 == 0)
static const time_t days_in_year[] =
{