]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
kv/rocksdb_cache: drop ROCKSDB_PRIszt
authorKefu Chai <kchai@redhat.com>
Tue, 17 Aug 2021 07:20:24 +0000 (15:20 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 1 Sep 2021 17:36:18 +0000 (01:36 +0800)
ROCKSDB_PRIszt is a macro for "zu", which is in turn use for printing an
(unsigned) size_t variable.

there is no point having it in the header file or define a macro for it,
as %zu is standard compliant, and we don't get any advantage by using a
macro for it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/kv/rocksdb_cache/ShardedCache.cc
src/kv/rocksdb_cache/ShardedCache.h

index 367140a94d8bead8adb48e33aa8547e473a98a9d..8e08deb8ba9fef93e6524a473d958e64eb4acfe2 100644 (file)
@@ -131,7 +131,7 @@ std::string ShardedCache::GetPrintableOptions() const {
   char buffer[kBufferSize];
   {
     std::lock_guard<std::mutex> l(capacity_mutex_);
-    snprintf(buffer, kBufferSize, "    capacity : %" ROCKSDB_PRIszt "\n",
+    snprintf(buffer, kBufferSize, "    capacity : %zu\n",
              capacity_);
     ret.append(buffer);
     snprintf(buffer, kBufferSize, "    num_shard_bits : %d\n", num_shard_bits_);
index 4d64893ab1c7bc889d646f66ee84374e8626f1e5..8ab2587bbf7c529818c681ec009962bbf43f0f03 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef CACHE_LINE_SIZE
 #define CACHE_LINE_SIZE 64 // XXX arch-specific define 
 #endif
-#define ROCKSDB_PRIszt "zu"
 
 namespace rocksdb_cache {