diff options
author | Alasdair G Kergon <agk@redhat.com> | 2015-07-06 15:09:17 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2015-07-06 15:09:17 +0100 |
commit | 810ab095e6709364d9f7c86d3754762aab3d976d (patch) | |
tree | 952810533448cb2ac1dbaf128ac1a5a5d5a7404e /lib/mirror | |
parent | 5fb71bd53062011dd962d77b233552ffad128238 (diff) | |
download | lvm2-810ab095e6709364d9f7c86d3754762aab3d976d.tar.gz |
macros: Wrap PRI with FMT.
Create a set of wrappers with embedded % such as
#define FMTu64 "%" PRIu64
Diffstat (limited to 'lib/mirror')
-rw-r--r-- | lib/mirror/mirrored.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index e57e9bb84..2156165dd 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -195,7 +195,7 @@ static int _mirrored_target_percent(void **target_state, pos += used; } - if (sscanf(pos, "%" PRIu64 "/%" PRIu64 "%n", &numerator, &denominator, + if (sscanf(pos, FMTu64 "/" FMTu64 "%n", &numerator, &denominator, &used) != 2) { log_error("Failure parsing mirror status fraction: %s", params); return 0; |