From 9f98b80f2ec596dd99c3e1addd01403ff5f5514e Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 28 Feb 2013 15:56:22 +0100 Subject: [PATCH] cls_rbd.cc: remove unused variable Remove unused variable 'len', left over from commit 0b0009cfe8429072ba2af6f6843537d5501b27c3. Signed-off-by: Danny Al-Gaaf --- src/cls/rbd/cls_rbd.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 3088f38178b5..982c8a66798c 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -1836,7 +1836,6 @@ int old_snapshot_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out) header = (struct rbd_obj_header_ondisk *)bl.c_str(); int snaps_id_ofs = sizeof(*header); - int len = snaps_id_ofs; int names_ofs = snaps_id_ofs + sizeof(*new_snaps) * header->snap_count; const char *snap_name; const char *snap_names = ((char *)header) + names_ofs; @@ -1885,8 +1884,6 @@ int old_snapshot_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out) new_snaps[0].id = snap_id; new_snaps[0].image_size = header->image_size; - len += sizeof(*new_snaps) * header->snap_count + header->snap_names_len; - memcpy(header_bp.c_str(), header, sizeof(*header)); newbl.push_back(header_bp); -- 2.47.3