chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
util: properly divide in 64bit in format_timestamp()
[elogind.git]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
index 78d8d5d9c5d99fd1a91d72858fda6d17a09407fe..766aa02965825651481d6bdf4146372a72f50def 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-1499,7
+1499,7
@@
char *format_timestamp(char *buf, size_t l, usec_t t) {
if (t <= 0)
return NULL;
- sec = (time_t)
t / USEC_PER_SEC
;
+ sec = (time_t)
(t / USEC_PER_SEC)
;
if (strftime(buf, l, "%a, %d %b %Y %H:%M:%S %z", localtime_r(&sec, &tm)) <= 0)
return NULL;