diff mbox

[7/8] messages/MOSDRepScrub.h: initialize member variable in constructor

Message ID 1360104750-16098-8-git-send-email-danny.al-gaaf@bisect.de (mailing list archive)
State New, archived
Headers show

Commit Message

Danny Al-Gaaf Feb. 5, 2013, 10:52 p.m. UTC
Initialize chunky and deep bool member variables in the constructor
with false.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
---
 src/messages/MOSDRepScrub.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sage Weil Feb. 6, 2013, 5:50 a.m. UTC | #1
On Tue, 5 Feb 2013, Danny Al-Gaaf wrote:
> Initialize chunky and deep bool member variables in the constructor
> with false.
> 
> Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
> ---
>  src/messages/MOSDRepScrub.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/messages/MOSDRepScrub.h b/src/messages/MOSDRepScrub.h
> index 2d3a66d..cd1de06 100644
> --- a/src/messages/MOSDRepScrub.h
> +++ b/src/messages/MOSDRepScrub.h
> @@ -36,7 +36,7 @@ struct MOSDRepScrub : public Message {
>    hobject_t end;         // upper bound of scrub, exclusive
>    bool deep;             // true if scrub should be deep
>  
> -  MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION) { }
> +  MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION) { chunky = false; deep = false; }

Let's use the C++ initalize syntax:

  MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION)
    : chunky(false), deep(false) {}

Just for consistency's sake!

sage

>    MOSDRepScrub(pg_t pgid, eversion_t scrub_from, eversion_t scrub_to,
>  	       epoch_t map_epoch)
>      : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION),
> -- 
> 1.8.1.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/messages/MOSDRepScrub.h b/src/messages/MOSDRepScrub.h
index 2d3a66d..cd1de06 100644
--- a/src/messages/MOSDRepScrub.h
+++ b/src/messages/MOSDRepScrub.h
@@ -36,7 +36,7 @@  struct MOSDRepScrub : public Message {
   hobject_t end;         // upper bound of scrub, exclusive
   bool deep;             // true if scrub should be deep
 
-  MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION) { }
+  MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION) { chunky = false; deep = false; }
   MOSDRepScrub(pg_t pgid, eversion_t scrub_from, eversion_t scrub_to,
 	       epoch_t map_epoch)
     : Message(MSG_OSD_REP_SCRUB, HEAD_VERSION, COMPAT_VERSION),