mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
hobject: fix snprintf args for 32 bit
Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
9ea02b8410
commit
5b022e8b15
@ -55,7 +55,7 @@ set<string> hobject_t::get_prefixes(
|
||||
char buf[20];
|
||||
char *t = buf;
|
||||
uint64_t poolid(pool);
|
||||
t += snprintf(t, sizeof(buf), "%.*lX", 16, poolid);
|
||||
t += snprintf(t, sizeof(buf), "%.*llX", 16, (long long unsigned)poolid);
|
||||
*(t++) = '.';
|
||||
string poolstr(buf, t - buf);
|
||||
set<string> ret;
|
||||
@ -78,7 +78,7 @@ string hobject_t::to_str() const
|
||||
char *end = t + sizeof(snap_with_hash);
|
||||
|
||||
uint64_t poolid(pool);
|
||||
t += snprintf(t, end - t, "%.*lX", 16, poolid);
|
||||
t += snprintf(t, end - t, "%.*llX", 16, (long long unsigned)poolid);
|
||||
|
||||
uint32_t revhash(get_filestore_key_u32());
|
||||
t += snprintf(t, end - t, ".%.*X", 8, revhash);
|
||||
|
Loading…
Reference in New Issue
Block a user