Skip to content

Commit cdbfbf9

Browse files
committed
format_timespan: use UINT64_C() macro
Once again for consistency with the rest of casync's source Signed-off-by: Arnaud Rebillout <[email protected]>
1 parent e955f76 commit cdbfbf9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/time-util.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
#define NSEC_INFINITY ((uint64_t) -1)
77

8-
//#define NSEC_PER_SEC ((uint64_t) 1000000000ULL) already defined in util.h
9-
#define NSEC_PER_MSEC ((uint64_t) 1000000ULL)
10-
#define NSEC_PER_USEC ((uint64_t) 1000ULL)
8+
//#define NSEC_PER_SEC ((uint64_t) UINT64_C(1000000000)) already defined in util.h
9+
#define NSEC_PER_MSEC ((uint64_t) UINT64_C(1000000))
10+
#define NSEC_PER_USEC ((uint64_t) UINT64_C(1000))
1111

12-
#define NSEC_PER_MINUTE ((uint64_t) (60ULL*NSEC_PER_SEC))
13-
#define NSEC_PER_HOUR ((uint64_t) (60ULL*NSEC_PER_MINUTE))
14-
#define NSEC_PER_DAY ((uint64_t) (24ULL*NSEC_PER_HOUR))
15-
#define NSEC_PER_WEEK ((uint64_t) (7ULL*NSEC_PER_DAY))
16-
#define NSEC_PER_MONTH ((uint64_t) (2629800ULL*NSEC_PER_SEC))
17-
#define NSEC_PER_YEAR ((uint64_t) (31557600ULL*NSEC_PER_SEC))
12+
#define NSEC_PER_MINUTE ((uint64_t) (UINT64_C(60)*NSEC_PER_SEC))
13+
#define NSEC_PER_HOUR ((uint64_t) (UINT64_C(60)*NSEC_PER_MINUTE))
14+
#define NSEC_PER_DAY ((uint64_t) (UINT64_C(24)*NSEC_PER_HOUR))
15+
#define NSEC_PER_WEEK ((uint64_t) (UINT64_C(7)*NSEC_PER_DAY))
16+
#define NSEC_PER_MONTH ((uint64_t) (UINT64_C(2629800)*NSEC_PER_SEC))
17+
#define NSEC_PER_YEAR ((uint64_t) (UINT64_C(31557600)*NSEC_PER_SEC))
1818

1919
char *format_timespan(char *buf, size_t l, uint64_t t, uint64_t accuracy);
2020

0 commit comments

Comments
 (0)