chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5ec357
)
time-util: when formatting usec_t as raw integers use PRIu64
author
Lennart Poettering
<lennart@poettering.net>
Thu, 2 Feb 2017 17:34:26 +0000
(18:34 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000
(17:58 +0200)
After all, usec_t is defined as uint64_t, and not as unsigned long long.
src/basic/time-util.c
patch
|
blob
|
history
diff --git
a/src/basic/time-util.c
b/src/basic/time-util.c
index 1fcbbaa478aed679e808b81c4e256aa735103ebf..265f5995a2e1b21e145c71a424f8ddb2a284a9c0 100644
(file)
--- a/
src/basic/time-util.c
+++ b/
src/basic/time-util.c
@@
-565,12
+565,12
@@
void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t) {
}
int dual_timestamp_deserialize(const char *value, dual_timestamp *t) {
- u
nsigned long long
a, b;
+ u
int64_t
a, b;
assert(value);
assert(t);
- if (sscanf(value, "%
llu %llu"
, &a, &b) != 2) {
+ if (sscanf(value, "%
" PRIu64 "%" PRIu64
, &a, &b) != 2) {
log_debug("Failed to parse dual timestamp value \"%s\": %m", value);
return -EINVAL;
}