]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_rbd.cc: remove another unused variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 15:12:20 +0000 (16:12 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 15:12:20 +0000 (16:12 +0100)
Remove 'new_snaps' since it only used for a sizeof() call,
get the size directly from the data type of new_snaps instead.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/cls/rbd/cls_rbd.cc

index 982c8a66798c87fe1cd46d97578a34f28cfafb2a..0ac889f67954e5a4fc150da53f138e5c01e079ba 100644 (file)
@@ -1903,7 +1903,6 @@ int old_snapshot_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *o
   struct rbd_obj_header_ondisk *header;
   bufferlist newbl;
   bufferptr header_bp(sizeof(*header));
-  struct rbd_obj_snap_ondisk *new_snaps;
 
   int rc = snap_read_header(hctx, bl);
   if (rc < 0)
@@ -1912,7 +1911,7 @@ int old_snapshot_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *o
   header = (struct rbd_obj_header_ondisk *)bl.c_str();
 
   int snaps_id_ofs = sizeof(*header);
-  int names_ofs = snaps_id_ofs + sizeof(*new_snaps) * header->snap_count;
+  int names_ofs = snaps_id_ofs + sizeof(struct rbd_obj_snap_ondisk) * header->snap_count;
   const char *snap_name;
   const char *snap_names = ((char *)header) + names_ofs;
   const char *orig_names = snap_names;
@@ -1979,7 +1978,6 @@ int old_snapshot_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *o
     return rc;
 
   return 0;
-
 }