]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/client/UserPerm.h
update sources to 12.2.7
[ceph.git] / ceph / src / client / UserPerm.h
index a2d6ccbe888d759ce966ba79bc41a695042f02b0..b73814ffad5e5b2e4647a8985f259b11a1b13346 100644 (file)
@@ -31,7 +31,7 @@ private:
     m_uid = b.m_uid;
     m_gid = b.m_gid;
     gid_count = b.gid_count;
-    if (gid_count) {
+    if (gid_count > 0) {
       gids = new gid_t[gid_count];
       alloced_gids = true;
       for (int i = 0; i < gid_count; ++i) {
@@ -79,8 +79,8 @@ public:
   void init_gids(gid_t* _gids, int count) {
     gids = _gids;
     gid_count = count;
+    alloced_gids = true;
   }
-  void take_gids() { alloced_gids = true; }
   void shallow_copy(const UserPerm& o) {
     m_uid = o.m_uid;
     m_gid = o.m_gid;