]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/RefCountedObj: use type of nref
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 6 Feb 2019 17:42:27 +0000 (09:42 -0800)
committerKefu Chai <kchai@redhat.com>
Wed, 17 Apr 2019 22:59:41 +0000 (06:59 +0800)
"int" may narrow the ref count (although very unlikely!).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/RefCountedObj.h

index 7596936a7c502edd7cc10d8f0f3e55a4f49758dc..eebedf22c752054bf871a93cdb10428cc963f035 100644 (file)
@@ -53,7 +53,7 @@ public:
   }
   void put() const {
     CephContext *local_cct = cct;
-    int v = --nref;
+    auto v = --nref;
     if (local_cct)
       lsubdout(local_cct, refs, 1) << "RefCountedObject::put " << this << " "
                                   << (v + 1) << " -> " << v