]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
hobject: fix snprintf args for 32 bit
authorSamuel Just <sam.just@inktank.com>
Fri, 15 Mar 2013 21:59:39 +0000 (14:59 -0700)
committerSamuel Just <sam.just@inktank.com>
Sat, 16 Mar 2013 00:05:54 +0000 (17:05 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/os/hobject.cc

index 1387a0ce280bfc8522432563738b381f910d7b97..515309f5bf46490cabd4f80b8a2af6a092abd512 100644 (file)
@@ -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);