From: Danny Al-Gaaf Date: Thu, 28 Feb 2013 15:12:20 +0000 (+0100) Subject: cls_rbd.cc: remove another unused variable X-Git-Tag: v0.59~61^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56777b0863bcecf97fc30946dc5c2daf2c9f7dad;p=ceph.git cls_rbd.cc: remove another unused variable 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 --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 982c8a66798c..0ac889f67954 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -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; - }